Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Programming with SQL in Access
Old 07-27-2007, 02:10 PM Programming with SQL in Access
Junior Talker

Posts: 1
Name: Alex
Trades: 0
I am trying to write a very simple program to count a number of entries, using user specifyed variables in an Access database. I know essentially the code to do it, but things like variables and that elude me.

This is essentially the program i want to make, with things in brackets being userdefined and things in square brackets being variables.

Code:
[Item] = SELECT PurchaseItems.ItemCode FROM PurchaseItems WHERE PurchaseItems.Description = (Item Name)

[DateRange] = SELECT TicketHeader.Code FROM TicketHeader WHERE TicketHeader.Date BETWEEN (StartDate) AND (EndDate)

Output SELECT COUNT(*) AS TotalCount FROM TicketDetail WHERE TicketDetail.ItemCode = [Item] AND TicketDetail.HeaderCode = [DateRange]
so on the last line i want to count the numbe of entries in TicketDetail (a table in the database) where the ItemCode is equal to the (single) ItemCode i returned on the first line, and the HeaderCode is equal to one of the values in [DateRange] of which there will be many

Any help making this into a proper program, which i need to do soo, would be hugely appreciated
notquitehere188 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Programming with SQL in Access
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.08209 seconds with 12 queries