Search Using Dropdown

  • Thread starter Thread starter Irwin109
  • Start date Start date
I

Irwin109

Why is it that whenever I make something new a horrible horrible error comes
up?!

Ok, here's my problem this time:

I have a dropdown box with Carer's Names in it is done so it shows the
surname once selected and in the dropdown selection it shows Surname,
Forename (in that order.

Now, I'm trying to do DoCmd.FindRecord function in VBA but I've written
DoCmd.FindRecord (Me.CarerDrpDown.Value) and it keeps coming up with an error
as it is looking at the forename and not surname, how do I get it to look at
the surname without removing the forename from the dropdown box?
 
If you have multiple columns in your combo box, you need to refer to them as
controlname.column(n) where n is 0 for the first column.
If you have surname and forename concatenated into one column then its a
little tricker since you will need to separate them out either in the query
that concatenates them or in your VB code.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
Back
Top