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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms - Combo Box

Status
Not open for further replies.

Adams

Technical User
Mar 10, 2001
44
0
0
US
I have a combo box on a form(Form1). The drop down contains company names. When a company name is selected their information is filled in on Form1.This works great as long as I stay in this form. I also have a button on the Form1 that opens up Form2. On Form2 I have a button that goes back to Form1. When I go back to Form1 I can use the drop down combo box but it fill in the companies information.

Private Sub Command37_Click()
On Error GoTo Err_Command37_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "F001_Company"

stLinkCriteria = "[T01_01_CompanyName]=" & "'" & Me![T01_01_CompanyName] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Me.Refresh


Exit_Command37_Click:
Exit Sub

Err_Command37_Click:
MsgBox Err.Description
Resume Exit_Command37_Click

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top