Button, GoTo Specified Record

wizcow

Registered User.
Local time
Today, 07:40
Joined
Sep 22, 2001
Messages
236
Hi

I have a Customer Lookup button on my 'Invoice' form.
I want to open the 'Customer' form (single form) and display the Customer that is showing on the 'Invoice'

I have fiddled with the GoTo method, with no success.

Thanks
Tom
 
Rich

I couldn't find a function in the wizard that opens a specified record using a forms criterea. I hope I'm not missing something.

My first post may not be very clear. Sorry. Let me try again.

For example;
Customer ABC's 'Invoice' form is open.
When I click this new button, it will open the 'Customer' form with ABC's record displayed. (Customer Info)

Tom
 
The wizard will show two options, show all records, find a record,
it will build a code something like
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "YourForm"

stLinkCriteria = "[CustomerID]=" & Me![CustomerID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
 
Thanks Rich

Your code did the trick. It works great.



Thanks again
Tom
 

Users who are viewing this thread

Back
Top Bottom