Combine fields into combo box?!

dagreat1mon

New member
Local time
Today, 12:44
Joined
Apr 21, 2005
Messages
8
hi all,

I have made a form to run reports on a database, however, I need to add a field where the end user can enter an account number and the report will find the relavent fields. The problem is that the account numbers are stored as four different fields within the database (add_char1, add_char5, add_char9, add_char13).

At the moment I am trying to use a combo box on the form to display all of the account numbers, but I have no idea how to do this, I can only get one field of account numbers (eg only entries from add_char1 displayed in the combo box). I have read several of the posts in these forums, but not really found a solution. If anyone knows of a way to display multiple fields as a single column (so that the combo box produces a list including add_char1 to add_char13), or have any other ideas then please let me know!

Cheers
 
You can get more colums to show when the box is 'dropped' by adding them to the query behind the combobox. If you want them to all show in the form you will need to create a new column in the query by adding all of the others together and display that one.

Accts:[add_char1] & " " & [add_char5] & " " & [add_char9] & " " & [add_char13]

HTH

Peter
 
Thanks for the response,

I have tried adding the extra column to the query and this has compiled the records into a single field, however this is not quite what I wanted as one record now displays four account numbers. As i want the account number to be selected individually, this does not really solve the problem!

Thanks for your time though, any other ideas?

Cheers
 
Sorry, I was looking at one account number made up from four fields. You want to combine the for fields as one long list.
To do this you will need to create a union query and base the combo on that. There are plenty of examples of Union queries here but if you need more specific help then shout back.

Peter
 
Yeah, looks like you got the right idea now, thanks, will have a look at some union querys then!

Cheers
 

Users who are viewing this thread

Back
Top Bottom