Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / July 2007

Tip: Looking for answers? Try searching our database.

Form opening the Last Record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sharon Greene - 05 Jul 2007 18:38 GMT
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?
Klatuu - 05 Jul 2007 19:22 GMT
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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.