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

Help with option compare database

Status
Not open for further replies.

jon182

Technical User
Feb 7, 2002
18
GB
What i want to do is when a paper is selected from a combobox in a form, the price of the paper is displayed in a textbox below it.
The text below is what i have so far, it doesn't work and i can't see why! It is entered in 'event'/ 'after update'
Combo36 is the name of the combobox being changed, paper1 is the table that the papers primary key is located and paperno is the papers primary key.


option Compare Database


Private Sub combo36_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "paper1.[paperno] = " & Str(Me![Combo36])
Me.Bookmark = rs.Bookmark
End Sub

Private Sub exit_Click()
On Error GoTo Err_exit_Click


DoCmd.Close

Exit_exit_Click:
Exit Sub

Err_exit_Click:
MsgBox Err.Description
Resume Exit_exit_Click

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top