M
MonTpython
I am working on a database that will check different projects for date
conflicts and will be linking to quite a few excel spreadsheets as data
sources for the individual project tables. The problem I am looking at is
trying to automate the process as much as possible through VBA.
I would like to know if there is a way to use VBA to set query criteria.
The reason for this is even though each table will have different projects,
the criteria will be identical for each of them and I would like to avoid
having to go in to manualy add in the criteria for each new table as it is
relatively lengthy.
The criteria I need to replicate is as follows
IIf(IsNull([Forms]![frmProjectCentral]![txtProjEnd]),[EagleStart],IIf(([Forms]![frmProjectCentral]![chkEagle]<0),IIf(([EagleStart]>[Forms]![frmProjectCentral]![txtProjEnd]),[EagleStart]),[EagleStart])) Or Is Null
The point of this criteria is to determine if the text box txtProjEnd on the
control form is null (if so give everything) if not see if the check box
associated with the project chkEagle is checked and if so apply the final
test of whether the new project date ends prior to the existing project's
start date.
Any help would be greatly appreciated
Thanks!
conflicts and will be linking to quite a few excel spreadsheets as data
sources for the individual project tables. The problem I am looking at is
trying to automate the process as much as possible through VBA.
I would like to know if there is a way to use VBA to set query criteria.
The reason for this is even though each table will have different projects,
the criteria will be identical for each of them and I would like to avoid
having to go in to manualy add in the criteria for each new table as it is
relatively lengthy.
The criteria I need to replicate is as follows
IIf(IsNull([Forms]![frmProjectCentral]![txtProjEnd]),[EagleStart],IIf(([Forms]![frmProjectCentral]![chkEagle]<0),IIf(([EagleStart]>[Forms]![frmProjectCentral]![txtProjEnd]),[EagleStart]),[EagleStart])) Or Is Null
The point of this criteria is to determine if the text box txtProjEnd on the
control form is null (if so give everything) if not see if the check box
associated with the project chkEagle is checked and if so apply the final
test of whether the new project date ends prior to the existing project's
start date.
Any help would be greatly appreciated
Thanks!