date wildcards in DCount

gbmarlysis

Registered User.
Local time
Today, 18:31
Joined
Jan 30, 2012
Messages
28
hi,
i need to count how many entries are before a date in a list box. the issue is the date of the record is used to give it a primary key eg lathl15/06/11r1. can i use dcount for this.
 
A primary key like that is going to be inefficient, to sort and manipulate" as it is a string. It also appears to be a constructed (calculated value). You would be better off using an AutoNumber as the primary key. You could then store the date as a field and the various other machine details separately.

This will then make selecting and sorting records by Date a whole lot easier. Given that you know the date and all the other machine details you can then construct your reference number (lathl15/06/11r1) any time you need to display it.
 
how do i construct a reference number combining three fields. Date/race no./event so i can select it from a combo box
 
In the Row Source of the Combo you can create an expression that bring those three items together;
Code:
Expr1: [Date] & "/" & [race no.] &"/"& [event]
I'm not sure if I've already mention to you but Date is a reserved word using it for field, object or control names is a sure fire route into a world of pain. Also avoid spaces and other special charter as they likewise have the potential to cause you no end of grief.
 

Users who are viewing this thread

Back
Top Bottom