D
David
I'm trying to validate and change (if necessary) what a user types in a
combo box, specifically a person's name. The bound combo box presents
records in tblPersons to the user in LastName, FirstName format. The
NotInList event will ask the user if they want to add the new person, but if
the user types in FirstName LastName format, the NotInList event will occur,
even though the person may already have a record in tblPersons. So, I tried
to check for a comma in the BeforeUpdate event, modify and replace the
user's text in the combo box with: Me.cboPerson.Column(1) =
LastNameCommaFirstName(Me.cboPerson.Column(1)) ...but I can't get the text
in the combo box to change. Instead I get "Runtime error '424': Object
required". When I hover my mouse pointer over the yellow highlighted text in
debug, the value returned from LastNameCommaFirstName is correct. Is there a
way to change the text in the combo box? Or does anyone know of a better
solution to the more general problem of correctly adding concatenated data?
Thanks for the help!
David
combo box, specifically a person's name. The bound combo box presents
records in tblPersons to the user in LastName, FirstName format. The
NotInList event will ask the user if they want to add the new person, but if
the user types in FirstName LastName format, the NotInList event will occur,
even though the person may already have a record in tblPersons. So, I tried
to check for a comma in the BeforeUpdate event, modify and replace the
user's text in the combo box with: Me.cboPerson.Column(1) =
LastNameCommaFirstName(Me.cboPerson.Column(1)) ...but I can't get the text
in the combo box to change. Instead I get "Runtime error '424': Object
required". When I hover my mouse pointer over the yellow highlighted text in
debug, the value returned from LastNameCommaFirstName is correct. Is there a
way to change the text in the combo box? Or does anyone know of a better
solution to the more general problem of correctly adding concatenated data?
Thanks for the help!
David