Please try and help

Matizo

Registered User.
Local time
Today, 10:58
Joined
Oct 12, 2006
Messages
83
Hello,
I try to create an Attendance Register,
It's to many to write so I would appreciate if someone could take a look at my database and try the Attendance Register in the forms section.
Just select the student(s) and use the button. The error msg appears:

3061 – Too few parameters. Expected 1.

Probably it’s a silly mistake but I just can’t find it.

Thanks,
 

Attachments

The problem is that the query qAttendance has a parameter and you are not providing it, which is what the error message is telling you. And that's for starters. :P (There were a lot of smaller issues that would've popped up down the line.)

Look at the code behind the button, look at the redesign on qAttendance, and note that I am writing directly to tblAttendance.

Take a look at all the editing I did to clean it up and make it work. It should help you with design on your own as well. :)
 

Attachments

Thanks for checking it :)

Well I tried use the register after your modifications and it still did not work.
Besides I just realized that the structure of my database is completely wrong :(
There are some integration errors in the tblGrading when choosing the instructor and also in the tblClasses when choosing the instructor.
I think I will need to get rid of combo boxes there.

Thanks for help,
Matt
 
Sorry, the changes you have made were correct:)
You just specified

rst!AttendanceDate = CDate(Me.txtToday)

I will use just Me.txtToday as there my be some updates. So when I change the date in the txtToday the register will update the table. If I would use

rst!AttendanceDate = CDate(Me.txtToday)

then it doesn't work,

Thanks again,
 
Glad it worked. I was sort of curious what wasn't working since I tested it before posting. I was converting it to a date (using CDate) because the date was just text, so I was going for the data integrity angle.

If you worked it out the way you want though, perfect. Programming is always learning, even after all my years doing this. :)
 
Hi,

I have one more question. What can I do (probably something with query) so when I use the Register first the dialogue box appears and asks to enter the class ID. And then on the list of members are just these members who are in that class. I tried using this:

SELECT tblMembers.LastName & ", " & tblMembers.FirstName AS FullName, tblClassesTaken.MemberID, tblClassesTaken.ClassID
FROM tblMembers INNER JOIN tblClassesTaken ON tblMembers.MemberID = tblClassesTaken.MemberID
WHERE (((tblClassesTaken.ClassID)=[Enter Class ID: ]))
ORDER BY tblMembers.LastName & ", " & tblMembers.FirstName;

But it works just for some members not all of them.
Any suggestions?

Thanks,
Matt
 

Users who are viewing this thread

Back
Top Bottom