473,503 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sending date to query problem

I have a number of queries, running one after the other, which do quite a
complex calculation. A text box on a form provides the date for this routine.

I have another routine I wish to do and it happens that the final query in the
above routine contains the data I need. However I don`t want to fire this
routine from the same form as before.

I could make copies and rename the queries I suppose but is there a way I could
enter the date in a new form, maybe open the original form, minimised ? send the
date to that text box then run the routine ?

Hope that makes sense. Suspect there is a simple way to do this but I`m missing
it

David B
Hexham UK

Nov 12 '05 #1
5 1585
Perhaps you could run your first set of queries from a button on a different
form than your date form. The first line of code would be:
DoCmd.OpenForm "NameOfForm ToEnterDate",,,,,acDialog

<Code to run queries>

DoCmd.OpenForm "NameOfSecondForm"
DoCmd.Close acForm, "NameOfFirstForm"

<Code to run other routine>

DoCmd.Close acForm, "NameOfForm ToEnterDate"
DoCmd.Close acForm, "NameOfFirstForm"

In the Date form, you would need the following code in the AfterUpdate event of
the Date textbox:
Me.Visible = False
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"David B" <Da***@marleycotenospam.fsnet.co.uk> wrote in message
news:c0**********@news5.svr.pol.co.uk...
I have a number of queries, running one after the other, which do quite a
complex calculation. A text box on a form provides the date for this routine.

I have another routine I wish to do and it happens that the final query in the
above routine contains the data I need. However I don`t want to fire this
routine from the same form as before.

I could make copies and rename the queries I suppose but is there a way I could enter the date in a new form, maybe open the original form, minimised ? send the date to that text box then run the routine ?

Hope that makes sense. Suspect there is a simple way to do this but I`m missing it

David B
Hexham UK

Nov 12 '05 #2
That should work. effectively call a popup form to enter the date
Thanks
DB

PC Datasheet <sp**@nospam.spam> wrote in message
news:I0*****************@newsread3.news.atl.earthl ink.net...
Perhaps you could run your first set of queries from a button on a different
form than your date form. The first line of code would be:
DoCmd.OpenForm "NameOfForm ToEnterDate",,,,,acDialog

<Code to run queries>

DoCmd.OpenForm "NameOfSecondForm"
DoCmd.Close acForm, "NameOfFirstForm"

<Code to run other routine>

DoCmd.Close acForm, "NameOfForm ToEnterDate"
DoCmd.Close acForm, "NameOfFirstForm"

In the Date form, you would need the following code in the AfterUpdate event of the Date textbox:
Me.Visible = False
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"David B" <Da***@marleycotenospam.fsnet.co.uk> wrote in message
news:c0**********@news5.svr.pol.co.uk...
I have a number of queries, running one after the other, which do quite a
complex calculation. A text box on a form provides the date for this routine.
I have another routine I wish to do and it happens that the final query in the above routine contains the data I need. However I don`t want to fire this
routine from the same form as before.

I could make copies and rename the queries I suppose but is there a way I

could
enter the date in a new form, maybe open the original form, minimised ? send

the
date to that text box then run the routine ?

Hope that makes sense. Suspect there is a simple way to do this but I`m

missing
it

David B
Hexham UK



Nov 12 '05 #3
What do you mean by "routine"? If you are trying to use the same reports,
then how does it matter that it comes from a new form? The results will be
the same unless you are changing the queries in the reports somehow.

Mike Storr
www.veraccess.com
"David B" <Da***@marleycotenospam.fsnet.co.uk> wrote in message
news:c0**********@news5.svr.pol.co.uk...
I have a number of queries, running one after the other, which do quite a
complex calculation. A text box on a form provides the date for this routine.
I have another routine I wish to do and it happens that the final query in the above routine contains the data I need. However I don`t want to fire this
routine from the same form as before.

I could make copies and rename the queries I suppose but is there a way I could enter the date in a new form, maybe open the original form, minimised ? send the date to that text box then run the routine ?

Hope that makes sense. Suspect there is a simple way to do this but I`m missing it

David B
Hexham UK

Nov 12 '05 #4
I want to display the data differently on a different form and in a different
part of my app.
David

Mike Storr <no****@somewhere.con> wrote in message
news:pW********************@news20.bellglobal.com. ..
What do you mean by "routine"? If you are trying to use the same reports,
then how does it matter that it comes from a new form? The results will be
the same unless you are changing the queries in the reports somehow.

Mike Storr
www.veraccess.com
"David B" <Da***@marleycotenospam.fsnet.co.uk> wrote in message
news:c0**********@news5.svr.pol.co.uk...
I have a number of queries, running one after the other, which do quite a
complex calculation. A text box on a form provides the date for this

routine.

I have another routine I wish to do and it happens that the final query in

the
above routine contains the data I need. However I don`t want to fire this
routine from the same form as before.

I could make copies and rename the queries I suppose but is there a way I

could
enter the date in a new form, maybe open the original form, minimised ?

send the
date to that text box then run the routine ?

Hope that makes sense. Suspect there is a simple way to do this but I`m

missing
it

David B
Hexham UK



Nov 12 '05 #5
Yes, and the key to it working is to make the popup form not visible so the date
is available to the second form.

Good luck!

Steve
PC Datasheet

"David B" <Da***@marleycotenospam.fsnet.co.uk> wrote in message
news:c0**********@newsg3.svr.pol.co.uk...
That should work. effectively call a popup form to enter the date
Thanks
DB

PC Datasheet <sp**@nospam.spam> wrote in message
news:I0*****************@newsread3.news.atl.earthl ink.net...
Perhaps you could run your first set of queries from a button on a different
form than your date form. The first line of code would be:
DoCmd.OpenForm "NameOfForm ToEnterDate",,,,,acDialog

<Code to run queries>

DoCmd.OpenForm "NameOfSecondForm"
DoCmd.Close acForm, "NameOfFirstForm"

<Code to run other routine>

DoCmd.Close acForm, "NameOfForm ToEnterDate"
DoCmd.Close acForm, "NameOfFirstForm"

In the Date form, you would need the following code in the AfterUpdate event

of
the Date textbox:
Me.Visible = False
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"David B" <Da***@marleycotenospam.fsnet.co.uk> wrote in message
news:c0**********@news5.svr.pol.co.uk...
I have a number of queries, running one after the other, which do quite a
complex calculation. A text box on a form provides the date for this routine.
I have another routine I wish to do and it happens that the final query in the above routine contains the data I need. However I don`t want to fire this
routine from the same form as before.

I could make copies and rename the queries I suppose but is there a way I

could
enter the date in a new form, maybe open the original form, minimised ?
send the
date to that text box then run the routine ?

Hope that makes sense. Suspect there is a simple way to do this but I`m

missing
it

David B
Hexham UK


Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
682716
by: vnl | last post by:
I'm trying to run a SQL query but can't find any records when trying to select a certain date. Here's the sql: SELECT field 1, field2, date_and_time, FROM table1 WHERE date_and_time =...
1
17306
by: Raghu | last post by:
Hello... I am running into a problem while running a query..can some1 help.. this is the query : ************** SELECT * from Table S where S.dtDate1 BETWEEN...
1
2461
by: Ken | last post by:
I wrote a function to use in queries that takes a date and adds or subtracts a certain length time and then returns the new value. There are times when my function needs to return Null values. ...
3
11568
by: Lyn | last post by:
Hi, I am developing a project in which I am checking for records with overlapping start/end dates. Record dates must not overlap date of birth, date of death, be in the future, and must not...
2
6501
by: Julie Wardlow | last post by:
Help! I am calculating a future date using the DateAdd function in a query (the calculation also involves an IIf statement), and have managed to get this formula to produce the required result....
3
6110
by: seegoon | last post by:
Hi to all. I have a small problem I hope someone can help me with. I am running a sql query to a csv file. The query searches for the total of a column between 2 dates. This is a copy of one of...
11
5874
by: Dixie | last post by:
How can I programatically, take some Date/Time fields present in a table in the current database and change their type to text? dixie
10
3257
by: Daniel | last post by:
In Microsoft Access I can write a query that includes the criteria: Between Date()-7 And Date() to retrieve the records from a table that fall within the last week. I'm trying to write a...
7
3314
by: bleachie | last post by:
Hey, I just need some help, my form seems to not send me all of the 'guestNames' and 'guestEmails' forms. i use this function to add more guestnames and guestemail fields based on the number of...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7291
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7012
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3171
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
402
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.