Set Value

Bear

Registered User.
Local time
Today, 09:05
Joined
Jan 20, 2000
Messages
11
Here's the situation, I've set up one form as a search form where you type in a ID# and click on the search button which starts the macro. The macro is set up to open form, maximize and then set value. The plan is to have it insert the ID# into the appropriate field on the other form if the record sinot found. But when I run it I get an error. I've set it up like this:
Item: [ID]
Expression: [Forms]![Search]![ID]
 
You could use this code under the Command button of the search form.

DoCmd.OpenForm "Form to Open", , , "ID =" & Me.ID

This will open the new form with a Where clause

You can also use "Me" to access variables from the recordset from which the form is based.

Check out DoCmd.OpenForm and Me under visual basic help. F1

Mark
 

Users who are viewing this thread

Back
Top Bottom