Thanks for the suggestions but no luck.
The issue really seems to be focused on the operators that I'm using with the IIF statement (between, >=,<=) since if they are not used then thing work (but not how I need them too.
User Profile
Collapse
-
One more discovery, I think if we can figure this out then I can use it to fix the above.
If I take the IF statement above and simplify for testing purposes to:
Like IIf(IsNull([Forms]![frm_CamasData]![BegDate])=True And IsNull([Forms]![frm_CamasData]![EndDate])=True,"*",[Forms]![frm_CamasData]![BegDate])
It works but only returns the exact date of the BegDate field if both BegDate and EndDate...Leave a comment:
-
Clarification
Well I figured out how to get the combined IsNull part of the statement to work:
Like IIf(IsNull([Forms]![frm_CamasData]![BegDate])=True And IsNull([Forms]![frm_CamasData]![EndDate])=True,"*",...
However everything after that part won't return any records still, here is a copy of the complete statement but it only works when BOTH the BegDate and EndDate fields are null.
...Leave a comment:
-
Thanks for the feedback. I have tried your suggestion and put the two IsNull statements together, however when I do this no records are returned. This is the code that combines them:
Like IIf(IsNull([Forms]![frm_CamasData]![BegDate]) and IsNull([Forms]![frm_CamasData]![EndDate]),"*",IIf(IsNul l([Forms]![frm_CamasData]![EndDate]),([qry_Add_Events_ frm].[Date])>=[Forms]![frm_CamasData]![BegDate],IIf(IsNull([Forms]![frm_CamasData]![BegDate]),([qry_Add_Events_ frm].[Date])<=[Forms]![frm_CamasData]![EndDate],([qry_Add_Events_ frm].[Date])...Leave a comment:
-
SOLUTION!
I must admitt that I couldn't follow the above advice, however, after much trial and error here is the solution that worked to solve the problem.
_______________ _______________ _______________ ______________
Private Sub cmdCloseEventFo rm_Click()
On Error GoTo Err_cmdCloseEve ntForm_Click
Dim stDocName As String
Dim stLinkCriteria As String
DoCmd.Save...Leave a comment:
-
Try this:
Like iif(IsNull([forms]![form1]![txt_item]),"*",[forms]![form1]![txt_item])
Good LuckLeave a comment:
-
Query criteria for Filtering Date fields: IIF Nested Operators won't work
Howdy All,
I have a query that is used for filtering results to be used in a combo box. The query needs to test fields from both a table and then unbound text boxes on the form that also contains the combo box. The fields I am working with are date fields that are formated as Short Date. I have written an IIF statement and placed it within the Criteria section of the Date field that I am trying to filter by. The current IIF statement... -
This makes sense but how do I use criteria (the specific record value from one f the fields) from Form B (which closes) as the criteria in the FindRecord or GoTo commands. This is really the problem that I can't figure out. Is there a way to store the value of the Form B field in a temporary holding field so that it can then be used to find the identified record in Form A.
Please bear with me as my experinence with VBA is limited at...Leave a comment:
-
Thanks for the respones but I don't think this is what I'm trying to make happen.
What needs to happen is that when the cmd button in Form B is clicked, Form B needs to close (which is does) and then in Form A (which remained open in the background since Form B was opend with acDialog) I want the form to automatically be updated with the record that was either edited/added when in Form B.
In other words, add record...Leave a comment:
-
Use selected record in Form B (acDialog Form) as go to criteria in Form A
Howdy all,
I have a form for entering data (Form A), on which is a cmd button that opens Form B in acdialog mode to allow me to enter/edit records that are being displayed on Form A.
After adding/editing a record on Form B (opened in acDialog mode), I want a cmd button on Form B to close Form B and then have Form A automatically take me to the record that was added/edited in Form B (Form A has a subform that I will then...
No activity results to display
Show More
Leave a comment: