Restricting Record Add

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a field in a column with this expression:

Fourth_Date_Count: DCount("[WorkshopDate]","Results","[WorkshopDate] =
'Wednesday, September 7, 2005 (9am - 1pm)'")

When I put code in the form to limit the ability to add records I am using
this:

If Fourth_Date_Count < 28 Then
msgbox("choose another date")
End If

It will not work properly. Though, if I use another field such as the
default priamry key field in place of Fourth_Date_Count it works. How can I
get my expression field to be recogninzed as a variable?

Also, I would much preferably do the limit coding within the query rather
than the form if anyone has suggestins on how I could do that.
 
Well, I found the answer to my question of how to get this to working, still
wondering if it is possible to do the same thing in a query, ommiting the use
of a access form.
 
Back
Top