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

Duplicate First and Last Names

Status
Not open for further replies.

hayde

Technical User
Feb 16, 2005
10
0
0
US
I am new to access and this site has been so helpful. I can not find though how to solve my current problem. I have a form set up to enter orders by entering the first and last name in seperate comboboxes. There is a popup box that alerts me if either the first or last name has not been entered previously and then directs me to the form to add a new customer. I am having trouble when the last name has already been entered ,as the popup box does not pop up because it is being wrongly associated with somebody elses first name. Any simply corrections? Thanks
 
Hayde,

Is your first and last name fields in the same table? If so you can set either of the combo boxes to open only thos fields that relate to the surname.

I would also use an autonumber as the primary key to reference each record.

For Example, you create 1 combo box with both the first, last and Auto ID number in it. Make sure that the auto id number is the first field in the combo box. Set this combo box for either the first naem or last name and then size the other columns to 0cm.

Second create a text box for the other record and either set its data to be:

"=combobox.column(2)" (the 2 being the column number of the field you want.

Alternatively you can set this in the combo boxes "Afterupdate" event.

Hope this helps

"The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top