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

Referencing Duplicate Field Name in Query

Status
Not open for further replies.

EddyLLC

Technical User
Mar 15, 2005
304
US
I have a report that gets it data from a query. The query consists of a number of tables and two totals queries. The problem is I have two fields that have the same name, "SumOfLineVal".

My question is how can I refer to one of the sums in code behind the report? The code I have is this:

If IsNull(Field1) Then
lngValue = [qryTotals!SumOfLineVal]
end If

This code does not recognize the SumOfLineVal. How can I reference this field?

Thanks
 
why do you name the 2 fields the same? and how can you?

I will try my best to help others so will others do!!!!!
IGPCS
Brooklyn, NY
 
Try the dot, not the bang.

lngValue = [qryTotals].[SumOfLineVal]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top