I created an Access database that is used to record help desk phone calls.
The database has a table (Problems), a form that allows users to add
problems, and another form that allows users to search for problems.
I would like to create a button for the main switchboard. When the user
clicks the button, a form should always open with the last problem that was
added to the table. The user should then be able to edit the information and
save it to the table. Each problem in the table has a unique identifier, so
the last problem entered is the one with the highest identifier.
How would I go about doing this?
Use the Where argument of the OpenForm method
Dim varUnique As Variant
varUnique = DMax("[Unique Identifier]","Call Table")
DoCmd.OpenForm "MyFormName", , , "[Unique Identifier] = " & varUnique
Make varUnique whatever data type your field is and put in the correct
delimiters in the OpenForm method.

Signature
Dave Hargis, Microsoft Access MVP
> I created an Access database that is used to record help desk phone calls.
> The database has a table (Problems), a form that allows users to add
[quoted text clipped - 7 lines]
>
> How would I go about doing this?
Sharon Greene - 05 Jul 2007 20:16 GMT
Is it possible to create a form that opens with the last record when the user
clicks a button on the switchboard?
> Use the Where argument of the OpenForm method
>
[quoted text clipped - 17 lines]
> >
> > How would I go about doing this?
Klatuu - 05 Jul 2007 21:46 GMT
What I posted earlier will do that. You may have to create a public function
in a standard module and use the runcode in the switchboard manager.
Sorry if I am a little rusty on that. I don't really use the switchboard
manager much.

Signature
Dave Hargis, Microsoft Access MVP
> Is it possible to create a form that opens with the last record when the user
> clicks a button on the switchboard?
[quoted text clipped - 20 lines]
> > >
> > > How would I go about doing this?