473,320 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Query in Subform to be updated with DateFields in Mainform

MS ACC 2003, WS.

In the subform i have query showing the results according to this SQL. It shows (grouped) number of customer data belonging to a specific dealer/vendor has in a related table.

Used tables:
Dealer/Vendor table is called SE_DealerList
Customer table is called CustomerData

This SQL shows the result, between 2 dates (DateField0 and DateField2):

SELECT [SE_Dealer List].retailerNumber, [SE_Dealer List].retailerName, [SE_Dealer List].VisitingCity, Count(*) AS Expression1

FROM [SE_Dealer List] INNER JOIN CustomerData ON [SE_Dealer List].retailerNumber=CustomerData.DealerID

WHERE ((CustomerData.[Invoicing Date]>=Forms!MainForm!DateField0 And CustomerData.[Invoicing Date]<=Forms!MainForm!DateField2))

GROUP BY (...)

Now: The query result is shown as a table in subform, where the DateField0 and DateField2 in the MAINform should automatically update the data shown in the subform.

How should i do it? I have tried update macros but i cannot find the right method...?

Please help!

Thx
Nov 9 '06 #1
3 1854
NeoPa
32,556 Expert Mod 16PB
I can't help much with the subform linking stuff I'm afraid, but you may want to use an easier form of WHERE clause as follows :
Expand|Select|Wrap|Line Numbers
  1. WHERE (CustomerData.[Invoicing Date] Between Forms!MainForm!DateField0 And Forms!MainForm!DateField2)
Nov 9 '06 #2
Thanks NeoPa, you helped me out with some new ideas on the last tip (I couldnt find it again so I wrote a new question?!)

Ill try some wild stuff tonight... !
Nov 9 '06 #3
NeoPa
32,556 Expert Mod 16PB
That's cool Rookie.
BTW - the other thread is here ( http://www.thescripts.com/forum/thread560998.html )
To find any of your created threads, just click on your name to be taken to your profile.
In the profile are options to see all posts by the selected member as well as to see all threads started by that member.
Nov 9 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Simon Pleasants | last post by:
Am something of a newbie at this, so please bear with any stupid questions. I have created a database to track shipments that we import. The information is stored in a table and I have created...
0
by: Dalan | last post by:
I'm sure there is a workaround for this, but haven't found it yet. I have a mainform with two subforms and after one or both of the subforms are updated, then clicking the Refresh button on the...
3
by: DFS | last post by:
I've been working around this for years (I believe), so I figured someone here might know: Why won't a crosstab query accept a value from a form reference? TRANSFORM...
1
by: Greatmaze | last post by:
Hi All, I want to update a column in my Users table through a subform. I have made a mainform where you can choose a Department (from Department table), then a subform pops-up showing the users...
1
by: planetthoughtful | last post by:
Hi All, I have a mainform with a subform in which I show some task summary data. On the mainform I have a number of unbound controls that reflect values relevant to each task in the subform....
1
by: James Hallam | last post by:
I have a form with a subform. When there are no entries in the subform, I have an append query which makes a default entry in the subform (for what I am doing there needs to be at least one value...
18
by: Robert Jacobs | last post by:
Please advise... I currently have a Mainform (Customers) and a Subform (Service Requests) with a one to many relationship (one customer, many service requests) with a CustomerID that is unique...
3
by: virtualgreek | last post by:
Dear all, I have a scenario that is driving me nuts. (MS Access 2003) I have a form/subform (Continuous form) where it gets its data from tables Order and Order_Details. In the footer...
1
by: jcf378 | last post by:
Is it possible to set a main-form with an embedded subform to "Filter by Form", subsequently enter the desired variables in fields in BOTH the main-form and subform, and then save the resulting...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.