Creating a running total dependant on a combo box

rfurb002

Registered User.
Local time
Today, 13:02
Joined
Feb 5, 2007
Messages
11
ok so this is my situtation

I have a combo box that allows people to select which week (value 1-6) they requested to come to. I then would like to have a text box calculate how many other people have request that week plus that person.

Any help will be greatly appreciated!

-Ron
 
ok this is my code:

Dim LTotal As Long

LTotal As Long

LTotal = DCount("OfficeWeekReceived", "Contacts", "")

Text189.Text = LTotal


Now OfficeWeekReceived (it's a combo box) can have a value of 1, 2, 3, 4, 5, or 6. I want it to be able based on the user's selection of 1-6 for it to count how many match that number they select in the combo box.

What am I doing wrong?

Thanks

Ron
 
You've left the criteria blank.
 
Did you look at the link? It's demonstrated there.
 
Well, the sample for numeric values, which you've stated yours are, and referring to a form control is:

DLookup("FieldName", "TableName", "Criteria = " & forms!FormName!ControlName)

Change the red values to your actual values and it should work.
 

Users who are viewing this thread

Back
Top Bottom