[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • Last Modified:

Access 2007. Use a list box on one form to open another form and populate it with selected information.

Hi,

I have a list box to select a client.  Then I need it to open another form to display that client's information.

Thanks,

Rick
0
taborrg
Asked:
taborrg
  • 3
  • 3
1 Solution
 
jdc1944Commented:
basically you need to reference the list box in the query that will display the clients name and then add a button on the form to open the other form with the clients info.

for example if your list box is storing a client ID called ClientID, your form is containing the list box is called frmClients.  then in the query that runs the form that shows the client information you can add [forms]![frmClients]![ClientID] to the criteria of the client ID in the query, if that makes any sense.
0
 
peter57rCommented:
Assuming the listbox is set to allow a single selection only (not mult-select) then you would use the afterupdate event procedure to open your second form.

I'm also assuming that the bound column of the listbox is the id field that identifies the record to be opened.

Docmd.openform "secondformname",,,"ID = " & me.lstboxname
0
 
jdc1944Commented:
Hopefully what you are after is attached in my example database, its a very basic way of doing it.

You can also ignore the button and add an afterupdate event to open the form instead.
Example.mdb
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
taborrgAuthor Commented:
I'm sorry, I couldn't follow that.

I have a table named Clients with ClientID and ClientName

A form with listbox lstSelectClient that looks at the Clients table

Another form with fields for client information.

0
 
jdc1944Commented:
can you upload your database?
whats the name of the other form that you want to open?
0
 
taborrgAuthor Commented:
Great!  Work right off.

Thanks!
0
 
taborrgAuthor Commented:
jdc1944 - thanks for the quick response!  
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now