Requery VBA Can't Find Form (1 Viewer)

Madmart1gan

Registered User.
Local time
Today, 09:17
Joined
Mar 19, 2014
Messages
12
I have a form that users use to input data into a table. I then have another form that shows the last saved/entered record. My intent is that after the data entry form is closed, VBA will trigger to refresh the last saved record form (named fLastSavedRecord). My VBA is:

Code:
 Private Sub SavedRec()
Forms!fLastSavedRecord.Requery
End Sub

When I run this code I get an error that says:

Run-time error '2450':
Microsoft Access cannot find the referenced form 'fLastSavedRecord'.

I have been trying variations for two days and cannot figure why it can't "see" my form. Just to test, if I go to create a Macro and use the 'OpenForm' command, the fLastSavedRecord form is available in the drop-down. I don't get it.
 

Users who are viewing this thread

Top Bottom