Change a form's current record

  • Thread starter Thread starter kraasty
  • Start date Start date
K

kraasty

How do i tell to an opened form/subform (in form view) to display a
specific record?
For example , how can I tell a form to display the record with
the PrimaryKey field = 56

Is there a way to do this in the MacroBuilder instead of the VBeditor ?

Andreas
 
kraasty said:
How do i tell to an opened form/subform (in form view) to display a
specific record?
For example , how can I tell a form to display the record with
the PrimaryKey field = 56

DoCmd.OpenForm "FormName" ,,, "[PrimaryKey field] =" & 56
Is there a way to do this in the MacroBuilder instead of the VBeditor ?

Use the Where Clause argument without the quotes or a form variable. Like
this:

[PrimaryKey field]=[Forms]![FormName]![txtID]
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

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

Back
Top