Query with Form problem

G

Guest

I have a query that one of the fields keys off a Textbox in a form.
Form = frmLU
Field in Query: PeriodClosed
Field in Form: tbPeriodClosed

Field PeriodClosed value for a record in the table may be either Null, or
have a value like 200607 or 200608 ie( YYYYMM). It is a Text Field.

Now I want to query the records that = the textbox even if it is Null.

Criteria: [Forms]![frmLU]![tbPeriodCleared]

The ones who have a value will return but if the textbox is null then no
records will return. How do I fix that.

Thank you,

Steven
 
M

Michael Gramelspacher

I have a query that one of the fields keys off a Textbox in a form.
Form = frmLU
Field in Query: PeriodClosed
Field in Form: tbPeriodClosed

Field PeriodClosed value for a record in the table may be either Null, or
have a value like 200607 or 200608 ie( YYYYMM). It is a Text Field.

Now I want to query the records that = the textbox even if it is Null.

Criteria: [Forms]![frmLU]![tbPeriodCleared]

The ones who have a value will return but if the textbox is null then no
records will return. How do I fix that.

Thank you,

Steven
Access takes this as 1 Jun 2006:
?DATEADD("d",DATEDIFF("d", 0, "2006-06"),0)

so presumably
?DATEADD("d",DATEDIFF("d", 0,
[Forms]![frmLU]![tbPeriodCleared]),0) might
work, if you format the text box like above.
 

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