Forms

M

Muriukis

Help Guys I have 2 textbox controls on a form The first textbox displays a
Transaction Date from a table called sales Now I want the second box to show
the Total count of products on that date and before am using the following
expression
=DCount("[ProductsCode]","Products","[DateIn]"<= "[Date]","Sales" where
datein is a field inthe Products table that I want to use as reference for
the counting What am I doing wrong and how can I get the total count of the
products using the date textbox? I want when I select a date in the Date
textbox other textbox to show the count of products upto that date e.g
20-apr-07 I want all count of products upto that date
 
D

Dennis

=DCount("[ProductsCode]","Products","[DateIn] <= " &
[Forms]![NameofForm]![FirstTextBox])

if your text box is not a date, then either make it a date or use

=DCount("[ProductsCode]","Products","[DateIn] <= #" &
[Forms]![NameofForm]![FirstTextBox] & "#")
 

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