|
-
Jun 4th, 2003, 02:20 PM
#1
Thread Starter
Lively Member
New here ... Need a little help
I dont do much work in databases, so I need a little help. I am working in Access and creating a form. I am having a user enter a name and a date, I want to check that against my table to make sure that name and date dont already exist.
I have my If statement and loop already written, but when I try ti run it I get this message:
db1 can't find the field '|' referred to in your expression.
Here is the code that I have:
Public Sub error_check()
x = [Homework_Club].[ID]
For i = 1 To x
If [Homework_Club.Student_Name] = Text1 And [Homework_Club.Date = Text22] Then
MsgBox "Student has already been entered for that date", vbCritical, "Error"
End If
Next i
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|