Access 97 form question.

W

Ward Horsfall

Hi,

Ok I have a simple Access 97 query.

How do I open a form from another form at a particular record.

E.g.

I open up a quote record.
On this screen it displays a customer ID which it gets
from an external lookup - which is in a combo box - ok
know how todo this.

So the customer record says "FRED"

I want to be able to set the double click event of this
control to open the customer form and position in on
the fred record. I can make it open the customer form
but not do the navigation.

Any ideas anybody?

Thanks,

Ward.
 
R

Rick Brandt

Ward Horsfall said:
Hi,

Ok I have a simple Access 97 query.

How do I open a form from another form at a particular record.

E.g.

I open up a quote record.
On this screen it displays a customer ID which it gets
from an external lookup - which is in a combo box - ok
know how todo this.

So the customer record says "FRED"

I want to be able to set the double click event of this
control to open the customer form and position in on
the fred record. I can make it open the customer form
but not do the navigation.

Any ideas anybody?

Drop a new command button on the form making sure the control wizard is enabled.
One of the wizard options for a button does exactly what you are describing.
you could copy the code to your double-click event afterwards.

Essentially you end up with code that uses the WHERE argument of DoCmd.OpenForm.

DoCmd.OpenForm "Customers",,,"CustomerID = " & Me.ID
 
W

Ward Horsfall

Rick,

Thanks for your help :)

Ward
Rick Brandt said:
Drop a new command button on the form making sure the control wizard is enabled.
One of the wizard options for a button does exactly what you are describing.
you could copy the code to your double-click event afterwards.

Essentially you end up with code that uses the WHERE argument of DoCmd.OpenForm.

DoCmd.OpenForm "Customers",,,"CustomerID = " & Me.ID
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top