Open form to specific record based on text box on navigation form

Sticky99

Registered User.
Local time
Today, 08:55
Joined
Nov 9, 2019
Messages
61
Hi Guys, I'm trying to open a form to a specific record, I have a navigation form with a button and text box where i can input the specific record number, although the form opens, it always opens to a new record, I'm using the following to open the form.

DoCmd.OpenForm "frmDeliveryNote", acNormal, "", "[DeliveryNoteID]=[Forms]![frmDNote]![txtSearchDNote]", , acNormal

can anyone throw some light on why the from doesn't open to the specific record.

Cheers
 
Hi. On a different note, have you tried using the BrowseTo method instead?
 
Hi Gasman,
is this what you mean

DoCmd.OpenForm "frmDeliveryNote", , , "[DeliveryNoteID]=[Forms]![frmDNote]![txtSearchDNote]"
 
Hi Gasman,
is this what you mean

DoCmd.OpenForm "frmDeliveryNote", , , "[DeliveryNoteID]=[Forms]![frmDNote]![txtSearchDNote]"
Yes, but you should only have two commas I believe.? Check that syntax link I posted.
 
If you can show us how you tried it, maybe we can show you how to fix it.
This is what I have
DoCmd.BrowseTo acForm, "frmDeliveryNote", "", "[Forms]![frmDeliveryNote]![DeliveryNoteID]= [forms]![DNote]![Text1]", "", 1
 
This is what I have
DoCmd.BrowseTo acForm, "frmDeliveryNote", "", "[Forms]![frmDeliveryNote]![DeliveryNoteID]= [forms]![DNote]![Text1]", "", 1
Hi. I think maybe that should have been more like:

Code:
DoCmd.BrowseTo acBrowseToForm, "frmDeliveryNote", , "DeliveryNoteId=" & Me.TextboxName
 
Last edited:
Hi. I think maybe that should have been more like:

Code:
DoCmd.BrowseTo acBrowseToForm, "frmDeliveryNote", , "DeliveryNoteId=" & Me.TextboxName
Thank You!!! it worked.
Thanks DBguy,
Much appreciated, I can sleep tonight.
Really great to be able to call on you guys for help.

Again, thanks.
 
Thank You!!! it worked.
Thanks DBguy,
Much appreciated, I can sleep tonight.
Really great to be able to call on you guys for help.

Again, thanks.
Hi. You're welcome. Glad we could assist. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom