MS Query Dropping Field Headings (not aliases)

KG Old Wolf

Board Regular
Joined
Sep 20, 2009
Messages
65
Thanks for reading and trying to help!

I have several MS Queries in an Excel Workbook that are called from within a VBA macro. In one or two (varies) the query will return all the data I need but it will not have the database field names in the query result columns (it will show Column1 Column2 etc.) I am not looking for Aliases for the field names... I just want the field names as defined in the Access table being queried. What makes this especially wierd is if I manually "refresh" the query, the names appear. It is always the last field or two in which the field name is being dropped. The queries are pretty much vanilla

SELECT `Paymix Master`.pmx_Payor_No, `Paymix Master`.pmx_Payor_Name, `Paymix Master`.pmx_Payor_1_No, `Paymix Master`.pmx_Payor_1_Name, `Paymix Master`.pmx_Payor_1_Percent, `Paymix Master`.pmx_Payor_2_No, `Paymix Master`.pmx_Payor_2_Name, `Paymix Master`.pmx_Payor_2_Percent, `Paymix Master`.pmx_Payor_3_No, `Paymix Master`.pmx_Payor_3_Name, `Paymix Master`.pmx_Payor_3_Percent, `Paymix Master`.pmx_Payor_4_No, `Paymix Master`.pmx_Payor_4_Name, `Paymix Master`.pmx_Payor_4_Percent, `Paymix Master`.pmx_Payor_5_No, `Paymix Master`.pmx_Payor_5_Name, `Paymix Master`.pmx_Payor_5_Percent
FROM `S:\FFS Model\Rates.accdb`.`Paymix Master` `Paymix Master`
WHERE (`Paymix Master`.pmx_Client_Abbr=?) AND (`Paymix Master`.pmx_Division_Abbr=?) AND (`Paymix Master`.pmx_Year=?)
ORDER BY `Paymix Master`.pmx_Payor_No

In this particular case, the last 4 fields (pmx_Payor_4_Percent through to the end appear with "Column1" through 4 instead of the field name. Anyone have any ideas? I have several other similar queries and they are functioning fine.

Best regards,
Ken
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I found it.... not related to the query itself.... caused by an overlapping address assignment. Looked at this for hours... finally asked for help and then found it almost immediately......
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top