![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm totally flummoxed. *We've had to change our change control practices and I've been happily coding along until today. *Goal is that we need to still work on and close old/open change requests while at the same time logging and actioning new ones. *So, I've now got four forms - crf_log_list_frm (+ a subform), crf_log_frm and crf_log_new_frm, working off one table crf_log_tbl. *The table has had an additional field new_old so that a "1" is an old change type and a "2" is a new type. *Why, the data's basically 90% the same, but we've added an addtional approval step to the process and it made no sense to make two tables. Don't want to either. *There's a lot of data for KPI stuff and it'd be silly to have to work off two tables. _Goal_: open the crf_log_lst_frm and double click on a record in the crf_log_list_subform so when looking in the table, the correct form opens. _Problem (as of today)_: double clicking on anything that is a "1" works like a treat, opening the right form, with the right record, every time. dobule clicking on anything that is a "2" ALWAYS opens on one particular record which is a "2". *Currently the only way to open another "2" record is to run the subform by itself and the re double click on the record. *Did NOT have to do this yesterday and I've changed the "2"s manually to see if it's made any difference - didn't. *The code below makes no difference if the crf_log_list form is closed first or last and was not going stupid yesterday. _Code (which was working quite well)_: Private Sub Form_DblClick(Cancel As Integer) Dim stLinkCriteria As String * * stLinkCriteria = "[CRF_ID]=" & "" & Me![CRF_ID] & "" * * If [New_old] = "1" Then * * DoCmd.OpenForm "CRF_log_frm", , , stLinkCriteria * * DoCmd.Close acForm, "crf_log_list_frm" * * DoCmd.Maximize * * End If * * If [New_old] = "2" Then * * DoCmd.OpenForm "CRF_log_new_frm", , , stLinkCriteria * * DoCmd.Close acForm, "crf_log_list_frm" * * DoCmd.Maximize * * End If End Sub _Difference_: today I added some extra records in the table with the view to automatically adding extra records from differing States, diffentiating the change request number with a prefix "B" or "S", but the CRF ID number is always unique. *All other data is the same and it's not making any difference if I remove the new "S" data and stick with the "B"s that have always been in the table. Regards, Stinky Pete ;-) |
#3
| |||
| |||
|
|
On Nov 10, 1:46*am, Stinky Pete <captainm... (AT) hotmail (DOT) com> wrote: Hi, I'm totally flummoxed. *We've had to change our change control practices and I've been happily coding along until today. *Goal is that we need to still work on and close old/open change requests while at the same time logging and actioning new ones. *So, I've now got four forms - crf_log_list_frm (+ a subform), crf_log_frm and crf_log_new_frm, working off one table crf_log_tbl. *The table has had an additional field new_old so that a "1" is an old change type and a "2" is a new type. *Why, the data's basically 90% the same, but we've added an addtional approval step to the process and it made no sense to make two tables. Don't want to either. *There's a lot of data for KPI stuff and it'd be silly to have to work off two tables. _Goal_: open the crf_log_lst_frm and double click on a record in the crf_log_list_subform so when looking in the table, the correct form opens. _Problem (as of today)_: double clicking on anything that is a "1" works like a treat, opening the right form, with the right record, every time. dobule clicking on anything that is a "2" ALWAYS opens on one particular record which is a "2". *Currently the only way to open another "2" record is to run the subform by itself and the re double click on the record. *Did NOT have to do this yesterday and I've changed the "2"s manually to see if it's made any difference - didn't. *The code below makes no difference if the crf_log_list form is closed first or last and was not going stupid yesterday. _Code (which was working quite well)_: Private Sub Form_DblClick(Cancel As Integer) Dim stLinkCriteria As String * * stLinkCriteria = "[CRF_ID]=" & "" & Me![CRF_ID] & "" * * If [New_old] = "1" Then * * DoCmd.OpenForm "CRF_log_frm", , , stLinkCriteria * * DoCmd.Close acForm, "crf_log_list_frm" * * DoCmd.Maximize * * End If * * If [New_old] = "2" Then * * DoCmd.OpenForm "CRF_log_new_frm", , , stLinkCriteria * * DoCmd.Close acForm, "crf_log_list_frm" * * DoCmd.Maximize * * End If End Sub _Difference_: today I added some extra records in the table with the view to automatically adding extra records from differing States, diffentiating the change request number with a prefix "B" or "S", but the CRF ID number is always unique. *All other data is the same and it's not making any difference if I remove the new "S" data and stick with the "B"s that have always been in the table. Regards, Stinky Pete ;-) is the recordsource for form CRF_log_new_frm selecting just one record, ie. for testing purposes ? this would cause the 'where' clause in openForm to seem like it is selecting the wrong record |
#4
| |||
| |||
|
|
On Nov 10, 1:46*am, Stinky Pete <captainm... (AT) hotmail (DOT) com> wrote: Hi, I'm totally flummoxed. *We've had to change our change control practices and I've been happily coding along until today. *Goal is that we need to still work on and close old/open change requests while at the same time logging and actioning new ones. *So, I've now got four forms - crf_log_list_frm (+ a subform), crf_log_frm and crf_log_new_frm, working off one table crf_log_tbl. *The table has had an additional field new_old so that a "1" is an old change type and a "2" is a new type. *Why, the data's basically 90% the same, but we've added an addtional approval step to the process and it made no sense to make two tables. Don't want to either. *There's a lot of data for KPI stuff and it'd be silly to have to work off two tables. _Goal_: open the crf_log_lst_frm and double click on a record in the crf_log_list_subform so when looking in the table, the correct form opens. _Problem (as of today)_: double clicking on anything that is a "1" works like a treat, opening the right form, with the right record, every time. dobule clicking on anything that is a "2" ALWAYS opens on one particular record which is a "2". *Currently the only way to open another "2" record is to run the subform by itself and the re double click on the record. *Did NOT have to do this yesterday and I've changed the "2"s manually to see if it's made any difference - didn't. *The code below makes no difference if the crf_log_list form is closed first or last and was not going stupid yesterday. _Code (which was working quite well)_: Private Sub Form_DblClick(Cancel As Integer) Dim stLinkCriteria As String * * stLinkCriteria = "[CRF_ID]=" & "" & Me![CRF_ID] & "" * * If [New_old] = "1" Then * * DoCmd.OpenForm "CRF_log_frm", , , stLinkCriteria * * DoCmd.Close acForm, "crf_log_list_frm" * * DoCmd.Maximize * * End If * * If [New_old] = "2" Then * * DoCmd.OpenForm "CRF_log_new_frm", , , stLinkCriteria * * DoCmd.Close acForm, "crf_log_list_frm" * * DoCmd.Maximize * * End If End Sub _Difference_: today I added some extra records in the table with the view to automatically adding extra records from differing States, diffentiating the change request number with a prefix "B" or "S", but the CRF ID number is always unique. *All other data is the same and it's not making any difference if I remove the new "S" data and stick with the "B"s that have always been in the table. Regards, Stinky Pete ;-) is the recordsource for form CRF_log_new_frm selecting just one record, ie. for testing purposes ? this would cause the 'where' clause in openForm to seem like it is selecting the wrong record- Hide quoted text - - Show quoted text - |
![]() |
| Thread Tools | |
| Display Modes | |
| |