Cost and DLookUp (1 Viewer)

TheSafetyGuy86

Registered User.
Local time
Today, 06:08
Joined
Jun 18, 2013
Messages
31
Good day!

I have a table that holds information for a type of show and the base cost of the show. I am trying to make a query that gathers information for all the shows in the table and uses the Dlookup function to identify the base cost of that show. This will in turn be used in the same query to create a quote, but I can not get the Dlookup function to work and I am sure that I may be doing it very wrong.

The table is called ShowList. That table contains 3 fields, ID, Show Type, and Cost.

The query is called Venue Cost and will have a series of fields that work to develop some math on all items from another table called Venue Info. Venue Info uses ShowList to select the type of show.

What I want the query to do is look up the Show type from VenueInfo and then look up the base cost of the show type from ShowList. What I have been using is not working but is as follows:

DLookUp("Cost","ShowList","[Cost] =" & "[Venue Cost]![Venue Type]")

Any help here would be nice. Thanks.

Safety Guy
 

plog

Banishment Pending
Local time
Today, 05:08
Joined
May 11, 2011
Messages
11,663
You generally don't need to use a Dlookup in a query. You simply bring in the datasource and link via the appropriate fields.

Can you provide sample data to show what you are trying to accomplish? Provide 2 sets of data:

A. Starting data from your table(s) - include table and field names and enough data to cover all cases.

B. Expected data - show what data you expect as a result when you feed in the data from A.
 

TheSafetyGuy86

Registered User.
Local time
Today, 06:08
Joined
Jun 18, 2013
Messages
31
Sure,

I will do my best here.

Alright, I have 2 tables. One is a list of show types with a base cost per show. This is built as follows:

Table Name: ShowList

ID Show Type Cost
1 Birthday $100
2 Wedding $200
3 Stage $300
4 Club $400

ShowList is used as a lookup table for the second table VenueInfo.

VenueInfo is used to store all the information for any particular venue/client, but one field in particular in this table is a lookup field called Venue Type. The point of VenueInfo is to hold all the information for each clients requested show and holds a lot more information than necessary for a quote, but the information I need is in this table.

I created a query to make a quote for each client based on information inside the VenueInfo table, but I want that query to show the base cost of the show located in ShowList. In order to do this, I was thinking that I needed to do a Dlookup within the same query that would then show the information I was looking for, but as I sit here and do more research, I think I may need to approach this from a different aspect. Either way, what I want it to do is lookup, within the query, the cost of the show from ShowList using the show type from VenueInfo.

Thanks for your response.
 

plog

Banishment Pending
Local time
Today, 05:08
Joined
May 11, 2011
Messages
11,663
Gonna have to show me with data:

A. Starting data from your table(s) - include table and field names and enough data to cover all cases.

B. Expected data - show what data you expect as a result when you feed in the data from A.
 

TheSafetyGuy86

Registered User.
Local time
Today, 06:08
Joined
Jun 18, 2013
Messages
31
Alright... nevermind. I was going about this way too complicated... I guess that's what I get for sitting here working on it for about 4 hours... I figured it out and appreciate your looking over the initial question and reply.Have a great day, sorry for the waste of time.
 

Users who are viewing this thread

Top Bottom