Hi, I posted a bit on the forum last year when I was creating a database for my county's Christmas program. I found some awesome help here so now that I'm gearing up for another holiday season, I wanted some help with tweaks to my database.
My first issue however, is that print buttons I created last year that worked FINE no longer seem to be working. I had someone help me with the code on those, so I have no clue why it's suddenly not working.
My two buttons are "PRINT CHILD CARD" and "PRINT P/U CARD". Both are supposed to print without opening. The only CHILD CARD and P/U CARD I want it to print when I hit those buttons is the one that has the same CHILD CODE as the form I am currently viewing onscreen.
Here is the combined code that worked last year:
Code:
End Sub
Private Sub cmdPrint_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[Child ID] = " & Me.[Child ID]
DoCmd.OpenReport "Child Card Print", acViewNormal, strWhere, strWhere
End If
End Sub
Private Sub print_pick_up_card_button_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[Child ID] = " & Me.[Child ID]
DoCmd.OpenReport "Child P/U Print", acViewNormal, strWhere, strWhere
End If
End Sub
I'm not sure this is enough info for you to help with. I tried uploading a dummy of my database but I couldn't get it below the 500kb requirement. I can email you the dummy database if you think you can help.
Thanks so much for your time.
Kristy
kristin.nash@dss.virginia.gov