Why wont this requery code work?

105ben

Registered User.
Local time
Today, 16:29
Joined
Feb 2, 2013
Messages
42
Hello,

Can anyone tell me why this code won't work?

Me."Search for a fault using Fault ID subform 2".Requery

Search for a fault using Fault ID subform 2 is the name of the subform
 
Try
Code:
Me.[Search for a fault using Fault ID subform 2].Requery

Although I would suggest not putting spaces in control names, it makes coding much easier.
 
Search for a fault using Fault ID subform 2 is the name of the subform

That is the name of the actual Subform control on the parent form? Or do you have an actual Access Form named that?

You need to specify the name of the subform control, not what ever form name the subform control happens to be displaying.
 
the square brackets worked thanks!

And I was also using the Form's name, rather than the subform's reference.... silly me!!

Cheers guys, both helped!
 

Users who are viewing this thread

Back
Top Bottom