I have a similar situation and tried your suggestion below, but it keeps
asking me for a value for both my fields, and even if I input the value, it
does not filter anyway.
I have a header form and a detail form.
There is a (No Issues) checkbox on the header that means that there is no
detail (Issues) present for the ProjectID that is in the header.
I have gone through about 4 iterations of this code, but this was my last try:
'note that these ProjectID's are Decimals (don't ask. designed by another
vendor)
'this code is located in form activate
Set frm = Me.frmProjectIssue.Form 'the detail form
'Me is the header form
frm.Filter = "Me.[ProjectId].Value - frm.[ProjectId].Value = 0"
frm.FilterOn = True
If frm.NewRecord Then 'no records found for filter 'OK
situation
frm.Filter = ""
frmFilterOn = True
Else 'records were found for ProjectID in
header 'NOT ok
frm.Filter = ""
frmFilterOn = True
... <code to present msgbox and uncheck the header checkbox>
Where am I going astray here and is there an easier way to check to see if
-any- matching (header ID = any detail) ID with the same value)?
Thanks.
--
MichaelM
Allen Browne said:
How about WHERE:
[Field1] - Int([Field1) = 0
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
n1mbus said:
I have a form with a key that is a number field with a field size of
'single'.
How can I filter the form to show only the records where the key field is
an
integer value.