By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,008 Members | 2,962 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,008 IT Pros & Developers. It's quick & easy.

Message Popup based on ID

P: n/a
I have a section of my app where I want to display a message detailing the #
of open issues, I want this to popup when they login and give them a choice
to look at the issues or continue on. This will be basd on thier workID. I
have a separate form for issues where I will query based on thier ID.

What do I need to look at to make this work?

TIA

Gerald

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200608/1

Aug 24 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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

Aug 24 '06 #2

P: n/a
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

Aug 25 '06 #3

P: n/a
Put a break in there and see what the value of strSQL is. Judging by
the looks of it, I doubt it's going to return anything.

gjameson via AccessMonster.com wrote:
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
Aug 25 '06 #4

P: n/a
I get this right after the last strSQL line.

SELECT DISTINCT [Maint Records].Tech Count([txtTechTicket]=[Maint Records].
Tech)

Here is the query I made in Query.

SELECT DISTINCTROW Count([Maint Records].Tech) AS txtTechTicket, [Maint
Records].Tech
FROM [Maint Records]
GROUP BY [Maint Records].Tech
HAVING ((([Maint Records].Tech)=[txtWorkID]));

This is counting ok.

ManningFan wrote:
>Put a break in there and see what the value of strSQL is. Judging by
the looks of it, I doubt it's going to return anything.
>Here is what I have so far.
[quoted text clipped - 28 lines]
DoCmd.OpenForm "fromOtherForm"
End If
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200608/1

Aug 25 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.