Open form with macro and filter records

  • Thread starter ThomasK via AccessMonster.com
  • Start date
T

ThomasK via AccessMonster.com

Im trying to open a form with a macro which is run when a comand button is
clicked on a switchboard form. The macro uses the OpenForm action to open the
form and a "where Condition" in order to limit the records to be displayed.
The form consist of a main form and a subform. The two fields that I want to
limit the records are "EnteredIntoCAD" and "LockBoxApprovalDate".

The where expression that Im using is: [EnteredIntoCAD]=2 And [Forms]!
[frmAddresses]![frmBldgAndSystems].[Form]![LockBoxApprovalDate] Is Not Null.

The form opens but it does not display any records except a new blank record.
If I just include the expression: [EnteredIntoCAD]=2 , it works fine. But
when I include the rest it doesnt work.

Is the problem the way Im expressing the date,, or the Not Null ?

Thanks
Tom
 
T

ThomasK via AccessMonster.com

I have found that I can open the subform "frmBldgAndSystems" with the macro
with this in the where condition line and it works fine...(
[LockBoxApprovalDate] Is Null) And ([EnteredIntoCAD]=2)....but for some
reason I cant get it to work when I try to open the main form.
Im trying to open a form with a macro which is run when a comand button is
clicked on a switchboard form. The macro uses the OpenForm action to open the
form and a "where Condition" in order to limit the records to be displayed.
The form consist of a main form and a subform. The two fields that I want to
limit the records are "EnteredIntoCAD" and "LockBoxApprovalDate".

The where expression that Im using is: [EnteredIntoCAD]=2 And [Forms]!
[frmAddresses]![frmBldgAndSystems].[Form]![LockBoxApprovalDate] Is Not Null.

The form opens but it does not display any records except a new blank record.
If I just include the expression: [EnteredIntoCAD]=2 , it works fine. But
when I include the rest it doesnt work.

Is the problem the way Im expressing the date,, or the Not Null ?

Thanks
Tom
 

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