Still batteling with stLinkCriterea HELP!!

G

Guest

Thanks that worked but one more problem.

The user loggon - from there the form opens as this form open the reminder
needs to po-up displaying info. A setvalue function sets the value of hidden
fields on the form to the detais of the person logging in. and another field
is set to Date(). The link criteria is these two fields searching for
reminders corresponding to the name of the forensic investigator and current
date set.

What happens is when the form is opened the pop-up appears with no info
displaying. This means that the link criteria function run before the
setvalue function and the date() function because it is evaluating blank
fields and giving me a blank reminder. But still the setvalue function is set
on the previous page

The setvalue function is on the On click function of the first page.

Any suggestions on this?

Douglas J. Steele said:
Pieter accidentally left off the closing quote for Forensic Investigator.
Also, remember that dates must be in mm/dd/yyyy format, regardless of what
your Short Date format has been set to through Regional Settings. Since you
can't always be sure what your users will use, it's best to be explicit.

Try:

stLinkCriteria = "[Forensic Investigator]=" & Chr$(34) & _
Me![Text24] & Chr$(34) & " AND [Date]=" & _
Format(CDate(Me![Text15]), "\#mm\/dd\/yyyy\#")


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Pizza said:
Thanks. Getting a compile error: Expexted: end of statement.

Pieter Wijnen said:
stLinkCriteria = "[Forensic Investigator]=" & "'" & Me![Text24] & " AND
[Date]=" & "#" & Me![Text15] & "#"

Pieter

Hello there. i am trying to create a Reminder pop-up on the on open
function
of a form. I was using the following:
Dim stDocName As String
Dim stLinkCriteria As String

DoCmd.Maximize

stDocName = "Reminder"
stLinkCriteria = "[Forensic Investigator]=" & "'" & Me![Text24] &
"'"
stLinkCriteria = "[Date]=" & "#" & Me![Text15] & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria

I have two sets of criteria that has to belinked before the pop-up
Reminder
opens. If i do it this way as above: only the last stLinkCriteria
applies.
Is
there anyway that i can combine the two????

--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 4426 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!
 
P

Pieter Wijnen

how about moving the code to set the Text24 & Text15 fields to the same
place you create the criteria (just before it)
even DoCmd.RunMacro will do it (ugh)
BTW You ought to change the names of your controls to something user
(programmer) friendly

--
Pieter Wijnen

My feeble Access pages (good links though)
http://www.thuleeng.com/access
When all else fail try:
http://www.mvps.org/access
http://www.granite.ab.ca/
http://allenbrowne.com/
http://www.lebans.com/



Pizza said:
Thanks that worked but one more problem.

The user loggon - from there the form opens as this form open the reminder
needs to po-up displaying info. A setvalue function sets the value of
hidden
fields on the form to the detais of the person logging in. and another
field
is set to Date(). The link criteria is these two fields searching for
reminders corresponding to the name of the forensic investigator and
current
date set.

What happens is when the form is opened the pop-up appears with no info
displaying. This means that the link criteria function run before the
setvalue function and the date() function because it is evaluating blank
fields and giving me a blank reminder. But still the setvalue function is
set
on the previous page

The setvalue function is on the On click function of the first page.

Any suggestions on this?

Douglas J. Steele said:
Pieter accidentally left off the closing quote for Forensic Investigator.
Also, remember that dates must be in mm/dd/yyyy format, regardless of
what
your Short Date format has been set to through Regional Settings. Since
you
can't always be sure what your users will use, it's best to be explicit.

Try:

stLinkCriteria = "[Forensic Investigator]=" & Chr$(34) & _
Me![Text24] & Chr$(34) & " AND [Date]=" & _
Format(CDate(Me![Text15]), "\#mm\/dd\/yyyy\#")


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Pizza said:
Thanks. Getting a compile error: Expexted: end of statement.

:

stLinkCriteria = "[Forensic Investigator]=" & "'" & Me![Text24] & "
AND
[Date]=" & "#" & Me![Text15] & "#"

Pieter

Hello there. i am trying to create a Reminder pop-up on the on open
function
of a form. I was using the following:
Dim stDocName As String
Dim stLinkCriteria As String

DoCmd.Maximize

stDocName = "Reminder"
stLinkCriteria = "[Forensic Investigator]=" & "'" & Me![Text24] &
"'"
stLinkCriteria = "[Date]=" & "#" & Me![Text15] & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria

I have two sets of criteria that has to belinked before the pop-up
Reminder
opens. If i do it this way as above: only the last stLinkCriteria
applies.
Is
there anyway that i can combine the two????

--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 4426 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top