Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box causes extra prompt parameter

Status
Not open for further replies.

RFAERBER

MIS
Oct 2, 2002
7
US
I am new to this so any help would be greatly appreciated. I have a form called weekly attendance sheet that I want to open based on employee's name selected in combo box but when I click on button I get prompted to enter attendance.id.

See below for code that was created.



Private Sub Attendance_Form_Click()
On Error GoTo Err_Attendance_Form_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "WEEKLY ATTENDANCE SHEET"

stLinkCriteria = "[Name]=" & "'" & Me![Combo25] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormEdit

Exit_Attendance_Form_Click:
Exit Sub

Err_Attendance_Form_Click:
MsgBox Err.Description
Resume Exit_Attendance_Form_Click

End Sub

Thanks
Ricky
 
Double check the SQL code of "WEEKLY ATTENDANCE SHEET"'s RecordSource.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top