Macro to open a form with specific record

G

Guest

I have always (with Access 2000) used the wizard to go from a button in a
list of records to a form with the selected record - it generates VBA. All
fine.

Now I have 2007 and it creates a macro. It opens the form but does not go to
the record. The main settings are:
Form Name: frmPage
View: Form
Where Condition: "[PageId]=" & [PageId]

I have macros enabled everywhere, a trusted certificate and a trusted
location. If I put in the old VBA it works just fine. Hope you can help.
Thanks.
 
K

Ken Snell \(MVP\)

Try this WHERE argument (note equals sign at front of expression):

Where Condition:
="[PageId]=" & [PageId]
 
G

Guest

Thanks Ken.

Looks like a bug in the wizard then.

Ken Snell (MVP) said:
Try this WHERE argument (note equals sign at front of expression):

Where Condition:
="[PageId]=" & [PageId]

--

Ken Snell
<MS ACCESS MVP>


Simon T-L said:
I have always (with Access 2000) used the wizard to go from a button in a
list of records to a form with the selected record - it generates VBA. All
fine.

Now I have 2007 and it creates a macro. It opens the form but does not go
to
the record. The main settings are:
Form Name: frmPage
View: Form
Where Condition: "[PageId]=" & [PageId]

I have macros enabled everywhere, a trusted certificate and a trusted
location. If I put in the old VBA it works just fine. Hope you can help.
Thanks.
 
K

Ken Snell \(MVP\)

Simon T-L said:
Thanks Ken.

Looks like a bug in the wizard then.

Yep, appears to be a bug. I've submitted this to Microsoft. Thanks for
finding it and letting us know!
 

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