If a particular form is loaded I want to use a data field from it in my query, if not the field will be left blank.
My code is
As you can see I ask the question if the form is loaded, if so i want to do a lookup in the current record of the database used in the form to get the TaxInvNo and that is then the value for this field 153: in my query
If it's not loaded I want to put " " in the value for this field 153: in my query
Not sure if it can be done or this is syntax problems
Any help would be appreciated
My code is
Code:
153: IIf (CurrentProject.AllForms("AddSTraceFrm").IsLoaded = True, DLookUp(" [SkipTraces]![TaxInvNo] ","SkipTraces"," [SkipTraces]![SkipTraceId] = Forms![AddSTraceFrm]![STraceIdFld] ")," ")
As you can see I ask the question if the form is loaded, if so i want to do a lookup in the current record of the database used in the form to get the TaxInvNo and that is then the value for this field 153: in my query
If it's not loaded I want to put " " in the value for this field 153: in my query
Not sure if it can be done or this is syntax problems
Any help would be appreciated