J
justlearnin
I have a form set up to pick the date to run report as anything lower than
date selected. How would I code thos in vb?
date selected. How would I code thos in vb?
Ofer said:If you are trying to open a report based on a field in the form, then create
a button, on the on click event enter the code
docmd.OpenReport "reportName",,,"[DateFieldName] < #" & Me.DateTextFieldName
& "#"
--
In God We Trust - Everything Else We Test
justlearnin said:I have a form set up to pick the date to run report as anything lower than
date selected. How would I code thos in vb?
justlearnin said:docmd.OpenReport "ExpiredMVR",,,"[LastMVR] < #" & Me.PastDate & "#"
This didnt work
ExpiredMVR is the report, LastMVR is date in table, Me.PastDate is the date
to search for.
I want it to pull any dates before PastDate
Ofer said:If you are trying to open a report based on a field in the form, then create
a button, on the on click event enter the code
docmd.OpenReport "reportName",,,"[DateFieldName] < #" & Me.DateTextFieldName
& "#"
--
In God We Trust - Everything Else We Test
justlearnin said:I have a form set up to pick the date to run report as anything lower than
date selected. How would I code thos in vb?
Ofer said:When you run the report, does it display all the records, it shouldn't have
any filter in it.
--
In God We Trust - Everything Else We Test
justlearnin said:docmd.OpenReport "ExpiredMVR",,,"[LastMVR] < #" & Me.PastDate & "#"
This didnt work
ExpiredMVR is the report, LastMVR is date in table, Me.PastDate is the date
to search for.
I want it to pull any dates before PastDate
Ofer said:If you are trying to open a report based on a field in the form, then create
a button, on the on click event enter the code
docmd.OpenReport "reportName",,,"[DateFieldName] < #" & Me.DateTextFieldName
& "#"
--
In God We Trust - Everything Else We Test
:
I have a form set up to pick the date to run report as anything lower than
date selected. How would I code thos in vb?
Ofer said:When you run the report, does it display all the records, it shouldn't have
any filter in it.
--
In God We Trust - Everything Else We Test
justlearnin said:docmd.OpenReport "ExpiredMVR",,,"[LastMVR] < #" & Me.PastDate & "#"
This didnt work
ExpiredMVR is the report, LastMVR is date in table, Me.PastDate is the date
to search for.
I want it to pull any dates before PastDate
Ofer said:If you are trying to open a report based on a field in the form, then create
a button, on the on click event enter the code
docmd.OpenReport "reportName",,,"[DateFieldName] < #" & Me.DateTextFieldName
& "#"
--
In God We Trust - Everything Else We Test
:
I have a form set up to pick the date to run report as anything lower than
date selected. How would I code thos in vb?
justlearnin said:This is what I have right now
Dim stDocName As String
stDocName = "rptExpiredMVR"
DoCmd.OpenReport "rptExpiredMVR", , , "[LastMVR] < #Me.PastDate[mm/dd/yyyy]#"
Ofer said:When you run the report, does it display all the records, it shouldn't have
any filter in it.
--
In God We Trust - Everything Else We Test
justlearnin said:docmd.OpenReport "ExpiredMVR",,,"[LastMVR] < #" & Me.PastDate & "#"
This didnt work
ExpiredMVR is the report, LastMVR is date in table, Me.PastDate is the date
to search for.
I want it to pull any dates before PastDate
:
If you are trying to open a report based on a field in the form, then create
a button, on the on click event enter the code
docmd.OpenReport "reportName",,,"[DateFieldName] < #" & Me.DateTextFieldName
& "#"
--
In God We Trust - Everything Else We Test
:
I have a form set up to pick the date to run report as anything lower than
date selected. How would I code thos in vb?
Ofer said:Try this
Dim stDocName As String
stDocName = "rptExpiredMVR"
DoCmd.OpenReport stDocName , , , "[LastMVR] < #" &
Format(Me.PastDate,[mm/dd/yyyy]) & "#"
--
In God We Trust - Everything Else We Test
justlearnin said:This is what I have right now
Dim stDocName As String
stDocName = "rptExpiredMVR"
DoCmd.OpenReport "rptExpiredMVR", , , "[LastMVR] < #Me.PastDate[mm/dd/yyyy]#"
Ofer said:When you run the report, does it display all the records, it shouldn't have
any filter in it.
--
In God We Trust - Everything Else We Test
:
docmd.OpenReport "ExpiredMVR",,,"[LastMVR] < #" & Me.PastDate & "#"
This didnt work
ExpiredMVR is the report, LastMVR is date in table, Me.PastDate is the date
to search for.
I want it to pull any dates before PastDate
:
If you are trying to open a report based on a field in the form, then create
a button, on the on click event enter the code
docmd.OpenReport "reportName",,,"[DateFieldName] < #" & Me.DateTextFieldName
& "#"
--
In God We Trust - Everything Else We Test
:
I have a form set up to pick the date to run report as anything lower than
date selected. How would I code thos in vb?
justlearnin said:I'm not understanding why it isnt working, I got all of the records again
Ofer said:Try this
Dim stDocName As String
stDocName = "rptExpiredMVR"
DoCmd.OpenReport stDocName , , , "[LastMVR] < #" &
Format(Me.PastDate,[mm/dd/yyyy]) & "#"
--
In God We Trust - Everything Else We Test
justlearnin said:This is what I have right now
Dim stDocName As String
stDocName = "rptExpiredMVR"
DoCmd.OpenReport "rptExpiredMVR", , , "[LastMVR] < #Me.PastDate[mm/dd/yyyy]#"
:
When you run the report, does it display all the records, it shouldn't have
any filter in it.
--
In God We Trust - Everything Else We Test
:
docmd.OpenReport "ExpiredMVR",,,"[LastMVR] < #" & Me.PastDate & "#"
This didnt work
ExpiredMVR is the report, LastMVR is date in table, Me.PastDate is the date
to search for.
I want it to pull any dates before PastDate
:
If you are trying to open a report based on a field in the form, then create
a button, on the on click event enter the code
docmd.OpenReport "reportName",,,"[DateFieldName] < #" & Me.DateTextFieldName
& "#"
--
In God We Trust - Everything Else We Test
:
I have a form set up to pick the date to run report as anything lower than
date selected. How would I code thos in vb?
Ofer said:The LastMVR field is a date/time type?
if not use that, try it anyway
stDocName = "rptExpiredMVR"
DoCmd.OpenReport stDocName , , , "cvdate(format([LastMVR],"mm/dd/yyyy")) <
#" &
Format(Me.PastDate,[mm/dd/yyyy]) & "#"
--
In God We Trust - Everything Else We Test
justlearnin said:I'm not understanding why it isnt working, I got all of the records again
Ofer said:Try this
Dim stDocName As String
stDocName = "rptExpiredMVR"
DoCmd.OpenReport stDocName , , , "[LastMVR] < #" &
Format(Me.PastDate,[mm/dd/yyyy]) & "#"
--
In God We Trust - Everything Else We Test
:
This is what I have right now
Dim stDocName As String
stDocName = "rptExpiredMVR"
DoCmd.OpenReport "rptExpiredMVR", , , "[LastMVR] < #Me.PastDate[mm/dd/yyyy]#"
:
When you run the report, does it display all the records, it shouldn't have
any filter in it.
--
In God We Trust - Everything Else We Test
:
docmd.OpenReport "ExpiredMVR",,,"[LastMVR] < #" & Me.PastDate & "#"
This didnt work
ExpiredMVR is the report, LastMVR is date in table, Me.PastDate is the date
to search for.
I want it to pull any dates before PastDate
:
If you are trying to open a report based on a field in the form, then create
a button, on the on click event enter the code
docmd.OpenReport "reportName",,,"[DateFieldName] < #" & Me.DateTextFieldName
& "#"
--
In God We Trust - Everything Else We Test
:
I have a form set up to pick the date to run report as anything lower than
date selected. How would I code thos in vb?