Forms/Queries

testsubjec

New member
Local time
Today, 06:02
Joined
Feb 5, 2009
Messages
4
Hi,

I am a returning Access programmer and for the life of me cannot remember this very simple function.

Basically what I am trying to do is this:

I have a form which allows the user to input two dates DD/MM/YYYY. These two dates are to be used in a standard query to pull information out between these two dates and a report is generated.

How do I get this two dates into the query i have made??

Thanks
 
Thanks for that.

Just on the back of this, how would you get the contents of a text box to be part of the query criteria just like we have done with the dates??
 
Using the same methodology. Create a public string variable, say

Code:
Public strDepartment As String

Then create a matching function

Code:
Function GetDepartment() As String
    GetDepartment = strDepartment
End Function


On your form you select a department from a combo box and on the AfterUpdate event

Code:
strDepartment = me.CboDepartment

Finally in your query

Code:
= GetDepartment()
 

Users who are viewing this thread

Back
Top Bottom