Caleeco
Well-known Member
- Joined
- Jan 9, 2016
- Messages
- 980
- Office Version
- 2010
- Platform
- Windows
Hello,
I have a basic form which I need to open & navigate to a record (based on todays date).
I have set the form "HotDesk Booker" form to open using the File > Options > Current Database > Display Form menu.
Within the Form Code, I have:
which links to
I'm not so sure the LoadRecord sub will work. However, the LoadRecord vba is running before the Hotdesk Form has even loaded. Which results in an error message saying .FindRecord is unavailable.
How can I force Access to wait for the form to load before selecting the right record upon opening the file?
Many Thanks
Caleeco
I have a basic form which I need to open & navigate to a record (based on todays date).
I have set the form "HotDesk Booker" form to open using the File > Options > Current Database > Display Form menu.
Within the Form Code, I have:
VBA Code:
Private Sub Form_Load()
DoEvents
Call LoadRecord(Me)
End Sub
which links to
VBA Code:
Sub LoadRecord(F As Access.Form)
'DoCmd.FindRecord Date, acEntire, True, acSearchAll, False, acAll, True
End Sub
I'm not so sure the LoadRecord sub will work. However, the LoadRecord vba is running before the Hotdesk Form has even loaded. Which results in an error message saying .FindRecord is unavailable.
How can I force Access to wait for the form to load before selecting the right record upon opening the file?
Many Thanks
Caleeco