S
Seth
I have a table called Customer with the ff fileld
Auto Number - Key
PhoneNumber - Combo - unbound
CellNumber - bound to Customer
CompanyName - Combo - unbound
FirstName - bound to Customer
Surname - bound to Customer
Etc
PhoneNumber and CompanyName are combo whilst the rest of
the fields are text boxes on a form. I need to be able to
search my Customer table using either PhoneNumber OR
CompanyName to establish whether the customer exists in
the table. ( This is part of a problem for now) I use the
following code to update the text boxes with the data
found in the Customer table
Private Sub CboCellNum_BeforeUpdate(Cancel As Integer)
On Error Resume Next
CboCellNum.SetFocus
If CboCellNum.Value > 0 Then
Me.Filter = "[ID]=" & CboCellNum.Value
Me.FilterOn = True
End If
End Sub
The problem is that as I have two unbound combos, only
one is updated. The combos have a 4 element drop down
list from the Customer table. The first element is
Autonumber(hidden) followed by three other field. How
best can I have all controls updated. Must the combos be
unbound ? Is this a wrong method? As I an just a
beginner describing the above code in detail will be
appreciated.
Thanks for the help
Auto Number - Key
PhoneNumber - Combo - unbound
CellNumber - bound to Customer
CompanyName - Combo - unbound
FirstName - bound to Customer
Surname - bound to Customer
Etc
PhoneNumber and CompanyName are combo whilst the rest of
the fields are text boxes on a form. I need to be able to
search my Customer table using either PhoneNumber OR
CompanyName to establish whether the customer exists in
the table. ( This is part of a problem for now) I use the
following code to update the text boxes with the data
found in the Customer table
Private Sub CboCellNum_BeforeUpdate(Cancel As Integer)
On Error Resume Next
CboCellNum.SetFocus
If CboCellNum.Value > 0 Then
Me.Filter = "[ID]=" & CboCellNum.Value
Me.FilterOn = True
End If
End Sub
The problem is that as I have two unbound combos, only
one is updated. The combos have a 4 element drop down
list from the Customer table. The first element is
Autonumber(hidden) followed by three other field. How
best can I have all controls updated. Must the combos be
unbound ? Is this a wrong method? As I an just a
beginner describing the above code in detail will be
appreciated.
Thanks for the help