...debug to check the numbers and conditions are being met, but the update is not happening under the right conditions.
Also, there is a difference in the update strings. Notice: Arrival_Verification = FALSE and Arrival_Verification = TRUE are the differences. *************
M. MARNEY
www.tgw.com
...reads:
=DCount("[Tee_Shirt_Size]", "tbl_Attendants", "[Tee_Shirt_Size] = 'L'" AND [Parish_Group_ID] = " & [Parish_Group_ID])
How does it know that I want the Parish_Group_ID that corresponds to the current page of the report? *************
M. MARNEY...
...rs.FindFirst "[Last_Name] = " & Str(Nz(Me!Text62, 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
The following statement gives a type mismatch error...
rs.FindFirst "[Last_Name] = " & Str(Nz(Me!Text62, 0))
Help? Thanks! *************
M. MARNEY
www.tgw.com
See, that's the problem. It never evaluates to false! Is it the After_Update event that is the problem? I tried the on_click, but that did not work either. (The triple property is false.) *************
M. MARNEY
www.tgw.com
I am running this code on the after_update event of the check box which is named Parish_Group_Arrival and is bound to the same name. *************
M. MARNEY
www.tgw.com
Paul,
That did not work. I have tried TRUE as well
here is the code...
If Me!Parish_Group_Arrival = -1 Then
DoCmd.RunSQL "String Here (Works)"
Else
DoCmd.RunSQL "String Here (Works)"
End If
Ideas? *************
M. MARNEY
www.tgw.com
...L' was misplaced.
Still having trouble though...
=DCount("[Tee_Shirt_Size]","tbl_Attendants","[Tee_Shirt_Size] = 'L' AND [Parish_Group_ID] = [Parish_Group_ID]")
This code returns the value as if Parish_Group_ID was disregarded.
??? *************
M. MARNEY...
...Else
DoCmd.RunSQL "UPDATE tbl_attendants SET Arrival_Verification = FALSE WHERE Parish_Group_Arrival = TRUE AND Parish_Group_ID = Forms!frm_Check_In_Attendants_by_Group!frm_Check_In_Attendants_by_Group_Subform.Form!Parish_Group_ID"
End If
Any thoughts? *************
M. MARNEY...
Randy,
Thank you for the code.
I need to add another field to the where clause though.
Basically...
"[Tee_Shirt_Size] = 'L' AND [Group_ID] = '&[Current_Group_ID]'"
Will this work? *************
M. MARNEY
www.tgw.com
...answer.
Here is the current code:
It works great in a form, but not in a report.
Dim rs As Object
Set rs = CurrentDb.OpenRecordset("Select * from tbl_Attendants Where Tee_Shirt_Size = 'L'")
rs.MoveLast
Me.tx_L_Count = rs.RecordCount
**The error is on the assignment to...
...answer.
Here is the current code:
It works great in a form, but not in a report.
Dim rs As Object
Set rs = CurrentDb.OpenRecordset("Select * from tbl_Attendants Where Tee_Shirt_Size = 'L'")
rs.MoveLast
Me.tx_L_Count = rs.RecordCount
**The error is on the assignment to...
...what is being acted upon (as the code indicates) and is Unbound.
That's about all I know to say.
The Recordset for the actual report is different than the one being defined in this code, but I thought since it worked in a form it should work in a report...
Help? *************
M. MARNEY...
Here is the current code:
It works great in a form, but not in a report.
Dim rs As Object
Set rs = CurrentDb.OpenRecordset("Select * from tbl_Attendants Where Tee_Shirt_Size = 'L'")
rs.MoveLast
Me.tx_L_Count = rs.RecordCount
**The error is on the assignment to the text box...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.