Thank you all for your help, as a newbie i have done more with my DB than i ever would have without you alls-)
I have a popup form where you enter
StartDate:_________
Enddate:___________
Typehardware or software)
Site:WW or RR
My query looks like this:
SELECT tblChange.Type, tblChange.[ChangeCtrl#], tblChange.StartDate, tblChange.EndDate, tblChange.Status, tblChange.Site, tblChange.Description
FROM tblChange
WHERE (((tblChange.StartDate) Between [Forms]![hardsoftpopup]![txtStartDate] And [Forms]![hardsoftpopup]![txtEndDate]) AND ((tblChange.Site)=[Forms]![hardsoftpopup]![cboSite]) AND (([Forms]![hardsoftpopup]![cboType])<>False));
My execute button on popupform looks like this:
Private Sub cmdOK_Click()
If IsNull(Me!txtStartDate) Then
MsgBox "Hey! Enter a Start Date."
Me!txtStartDate.SetFocus
ElseIf IsNull(Me.txtEndDate) Then
MsgBox "Hey! Enter an End Date."
Me!txtEndDate.SetFocus
ElseIf IsNull(Me.cboType) Then
MsgBox "Hey! Enter Type."
Me!cboType.SetFocus
ElseIf IsNull(Me.cboSite) Then
MsgBox "Hey! Enter Site Name."
Me!cboType.SetFocus
Else
DoCmd.OpenReport " rptHardSoft", acPreview
DoCmd.Close acForm, Me.Name
End If
End Sub
As you can see the query will check a specific date range
site name and type of update(either hardware or software).
Everything works fine,"but" when i do
startdate: 09/22
enddate: 09/24
Site:ww
Type: software
I get:
software 09/22 09/24
software 09/22 09/24
hardware 09/22 09/24
I don't know how to fix its-)
It look like the dates are overiding the type criteria:
is their any way i can restrict the hardware entries(when running a software query)(and vice versa) eventhough it doe fit the specified date range criteria....
I am totally all thunk out....can any help me...i'd be very gratefuls-)
I have a popup form where you enter
StartDate:_________
Enddate:___________
Typehardware or software)
Site:WW or RR
My query looks like this:
SELECT tblChange.Type, tblChange.[ChangeCtrl#], tblChange.StartDate, tblChange.EndDate, tblChange.Status, tblChange.Site, tblChange.Description
FROM tblChange
WHERE (((tblChange.StartDate) Between [Forms]![hardsoftpopup]![txtStartDate] And [Forms]![hardsoftpopup]![txtEndDate]) AND ((tblChange.Site)=[Forms]![hardsoftpopup]![cboSite]) AND (([Forms]![hardsoftpopup]![cboType])<>False));
My execute button on popupform looks like this:
Private Sub cmdOK_Click()
If IsNull(Me!txtStartDate) Then
MsgBox "Hey! Enter a Start Date."
Me!txtStartDate.SetFocus
ElseIf IsNull(Me.txtEndDate) Then
MsgBox "Hey! Enter an End Date."
Me!txtEndDate.SetFocus
ElseIf IsNull(Me.cboType) Then
MsgBox "Hey! Enter Type."
Me!cboType.SetFocus
ElseIf IsNull(Me.cboSite) Then
MsgBox "Hey! Enter Site Name."
Me!cboType.SetFocus
Else
DoCmd.OpenReport " rptHardSoft", acPreview
DoCmd.Close acForm, Me.Name
End If
End Sub
As you can see the query will check a specific date range
site name and type of update(either hardware or software).
Everything works fine,"but" when i do
startdate: 09/22
enddate: 09/24
Site:ww
Type: software
I get:
software 09/22 09/24
software 09/22 09/24
hardware 09/22 09/24
I don't know how to fix its-)
It look like the dates are overiding the type criteria:
is their any way i can restrict the hardware entries(when running a software query)(and vice versa) eventhough it doe fit the specified date range criteria....
I am totally all thunk out....can any help me...i'd be very gratefuls-)