Navigate from a list to an edit record form (1 Viewer)

darren_access

Registered User.
Local time
Today, 09:46
Joined
Jan 8, 2018
Messages
57
Traditionally in the web world i would create a list page with a few fields and an 'edit' button on the end, appending a url parameter to pass to a form whereupon displaying the record to be edited.

Can this be achieved in Access?

Currently I have a combo box at the top of the edit form allowing the user to choose a record to edit, but need also to create a project list for review purposes and allow user to select the project to be edited as well.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 12:46
Joined
Feb 19, 2002
Messages
43,607
You can use a command button if you are using a form in Continuous Form View but if you want to use Datasheet View, you can't use a button. In that case you would use the double-click event of one of the controls. If the form does not allow updates, you could use the click event if you prefer. In Access I always use the double-click event for this purpose even on forms that don't allow updates just because constancy is important and I don't want one form working one way and another form working a different way.

To add the code use the ellipsis (three dots) button to open the code window where you can simply add your DoCmd.OpenForm action. For these controls where I have enabled the double-click action, I set the "Display as Hyperlink" properto on the Format tab to Always. This gives people a visual clue that something will happen with this control if they double-click on it.
 

darren_access

Registered User.
Local time
Today, 09:46
Joined
Jan 8, 2018
Messages
57
i have a report called "project list" already created. Can the same button functionality be added to a report? On the web i could've have created a button with a url parameter, but not sure about access.

Sorry for the vagueness, hell i'm still stumbling in the dark using the Access gui lol
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 09:46
Joined
Aug 30, 2003
Messages
36,139
A button can be used in Report view, not Preview.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 12:46
Joined
Feb 19, 2002
Messages
43,607
I would open a list form rather than a report. Although as Paul said, as long as you open the report in Report View, buttons will be active and can run code.
 

Users who are viewing this thread

Top Bottom