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

is it possible to combine 2 fields from separate tables into 1 field

Status
Not open for further replies.

Blitz

Technical User
Jul 7, 2000
171
US
is it possible to combine 2 fields from separate tables into 1 field on a query? If so how?
 
EAsy enough...<br><br>When you are in Design mode of your query, create a field by type a name then a colon then type the first field name an ampersand &quot;&&quot; and then the second field name.&nbsp;&nbsp;For instance.<br><br>Field:&nbsp;&nbsp;Username: = [Fname] & &quot; &quot; & [Lname]<br><br>You would probably want to add a space inbetween the fields, hence the quote, a space, and another quote.&nbsp;&nbsp;The ampersand ties it all together.<br><br>HTH<br><br>Mary :eek:)<br>
 
Oops... forgot you mentioned two tables... Just precede the field name with the table name and an exclamation point!<br><br>Field: Username:=[table1]![Fname] & &quot; &quot; & [table2]![Lname]<br><br><br>HTH<br><br>Mary :eek:)
 
Well it worked but didnt do what I wanted it to do.<br><br>Heres my problem, maybe Im attacking it the wrong way.<br><br>In my database I have a table of buildings a table of board members and a table of onsite staff. In board members and onsite staff there is a yes/no field if they recieve financial reports or not. For each building there is either a onsite staff or board member that recieves financial reports. I need to create 1 query that lists EVERYONE (which is 1 person per building) that receives a financial report. <br><br>What I have been able to do so far is do a query that only shows the board members that receive the financial reports and I have been able to do a separate query that lists all the onsite staff that receive financial reports but I cant get 1 query to show both. <br><br>I know this is probably too complicated for anyone to want to help me but I would appreciate any help.
 
Sounds like a IFF statement would work, try creating two fields in your query using the IFF based on the yes/no that should work if I'm understanding you correctely.
 
Im sorry, Im new at this and dont understand how to do what you just said. Could you go into more detail on how to do it?
 
Nevermind I figured it out. The SQL Union query is what I needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top