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

Record Selection in Form/SubForm 1

Status
Not open for further replies.

rlf1957

IS-IT--Management
Mar 7, 2003
60
US
I have an inquiry form made up of customer info (Top of form). Sub form is Invoices for that customer. This is very similar to the Access 97 Order Entry sample. Used the Form Wizard to build. Form in its current state works ok, but rather than scroll thru the customers using navigation arrows (hence invoices) I tried to use the Customer name field in a combobox.
Results: I can scroll thru the whole list of customers in the drop down but nothing happens when I click on another customer name.

Using "Edit/Find" with cursor in this field does work, but it is not as clean as I would like.

Thanks for any guidance you may offer.
 
use a combo box to pick a specific record.


rollie@bwsys.net
 
As I explained, that is exactly what I'm trying to do but it doesn't seem to work. I can scroll (in the combo box) thru the whole list of customers but when I click on one nothing happens. The original customer that displayed when I entered the form and its' invoices remain displayed.

Thanks,

RF
 
YOu have to associate code like this to the click of the combo box.

Private Sub cboFyndr_Click()
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.MoveLast
rs.MoveFirst
Do While Not rs.EOF

If Val(rs("AcctID")) = Val(Me.cboFyndr) Then
Me.Bookmark = rs.Bookmark
Exit Do
End If
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
End Sub

R
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top