Here is what I have so far.
DoCmd.Close acForm, "Splash", acSaveNo
strSQL = "SELECT DISTINCT [Maint Records].Tech"
strSQL = strSQL & " Count([txtTechTicket]=[Maint Records].Tech) "
strSQL = strSQL & " ((([Maint Records].Tech)=[txtWorkID]))" & ";"
Debug.Print txtTechTicket
MsgBox ("You have " & [txtTechTicket] & " tickets open. Do you want to
work tickets now?"), vbQuestion, "Open Tickets"
The problem I am having now is that it does not look like my query is
executing. i have one record in the table that will match, but txtTechTicket
is showing 0. What am I missing?
pi********@hotmail.com wrote:
>You can use DCount to get the count of open issues So you could have
code in your startup form that runs when it opens that gets the count
of open issues with DCount, and if it's non-zero, show a Msgbox asking
if the user wants to look at the open issues. You can easily use the
MsgBox function for it.
dim intReply as Integer
intReply=MsgBox("Would you like to look at the open
issues?",vbYesNo,"Open issues exist")
if intReply=vbYes Then
DoCmd.OpenForm "frmSomeForm"...
else
DoCmd.OpenForm "fromOtherForm"
End If
--
Message posted via
http://www.accessmonster.com