G
Guest
I have a Form and pops up over another form when you select a button to do
some mathematical calculations. When the calculations are complete, I want
to make sure that I am coming back to my main form at the correct record.
I have a global variable TempRecordID which I load with the record number
of my main table. However I get an error when I run this command during the
close form of my math calc form:
DoCmd.GoToRecord acDataForm, "Base_Main_Form", acGoTo, TempRecordID
Base_Main_Form is my main form.
The error message I get is the "Can't go to the specified record" . I have
used this code in another function that is virtually identical to this and
and it works fine.
TempRecordID does have the correct record number.
So am I doing something wrong and it's a fluke that it is running fine
elsewhere?
some mathematical calculations. When the calculations are complete, I want
to make sure that I am coming back to my main form at the correct record.
I have a global variable TempRecordID which I load with the record number
of my main table. However I get an error when I run this command during the
close form of my math calc form:
DoCmd.GoToRecord acDataForm, "Base_Main_Form", acGoTo, TempRecordID
Base_Main_Form is my main form.
The error message I get is the "Can't go to the specified record" . I have
used this code in another function that is virtually identical to this and
and it works fine.
TempRecordID does have the correct record number.
So am I doing something wrong and it's a fluke that it is running fine
elsewhere?