Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populating form elements from database table

Status
Not open for further replies.

macleodjb

Technical User
Aug 27, 2007
10
Hi guys,
I'm new to using VBA with access. I have a form with some checkboxes and textboxes that correspond to fields that are in my database table. What i would like to do is have a form pop up in the beginning asking the user for a job number and when the user clicks the submit button it will query the database retrieve records and then open and populate my form with the checkboxes and textboxes. How can i accomplish this?
 
The usual way is to use a bound form with bound controls. A form can be opened to a particular record, for example:

[tt]DoCmd.OpenForm "frmJobs",,,"JobNo=" & Me.JobNo[/tt]

It is always a good idea to look at the sample databases, in particular Northwind.
 
Ok so i have a form where i can enter the job number, on submit opens the form edit job. how can i get the open form to either hide or close itself after the edit job form has been opened?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top