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!

Multiple Rows in to One

Status
Not open for further replies.

jguesman14

Technical User
May 12, 2014
10
0
0
US
Let me try to explain. I have a database for a property management company. The table looks like this:

Apartment Tenant
1001-01 Smith
1001-02 Doe
2001-01 Jane
2001-02 John

The maintenance man has an inspection sheet that he must complete. Currently it is in Excel and I want to include it in the database. The problem that I am having is the inspection sheet is set up to list the first floor of apartments (both 01 and 02) as a merged cell and then two cells for the tenants and the following cells merged for the checklist. I know I am probably not making sense but it's difficult to explain! LOL
For Example:

Apt Name Doors Locks Fire Ext.
1001 Smith
Doe
1002 Jane
John

I can create a report in the database but it's listing the apartments and the boxes for the checklist as two boxes and I need it to be one. The only column that needs two is the one with the tenants name. There is probably a simple solution but I sure can't figure it out!
 
Hi,

Why do you need the Name when you already have that in your Access table.

Merge, in Excel, is a display feature and not for data storage tables. It is generally a blight!!!
Code:
Select apartment, tenant, Doors, Locks, Fire, Ext
From [your access table], [your Excel table]
Where apartment=apt;
The second row of each pair will be filtered out since Apt is empty in Excel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top