Can't go to specified record

CCIDBMNG

Registered User.
Local time
Today, 14:48
Joined
Jan 25, 2002
Messages
154
I have a customers form and in the form header I have a frame with 2 option buttons. I want the user to choose to either add a new record or search for a specified record. The search works fine but the DoCmd.GoToRecord , , acNewRec doesn't work. I get the error "You can't go to specified record." If I use a text box with that code it works just fine but it won't work with an option button. Does anyone know why this is or how I can get around it?

Thanks so much in advance.
 
If I do that I get the error "You must save the field before you execute the GoToControl action, the GoToControl method, or the SetFocus method.
 
I get that error when I set the focus first. If I set it after I get the original error.
 
I figured it out. I had this code in the before update event of the frame. I placed it in the on click event and it works fine. Thanks for your help.
 

Users who are viewing this thread

Back
Top Bottom