Darrenc
Registered User.
- Local time
- Today, 13:55
- Joined
- Apr 30, 2004
- Messages
- 62
Hello to all you Access Experts, i'm having a little problem with some code that i'm trying to modify.
There's something wrong with the following code that i can't figure out.
I've checked all the table and field names, and they are all correct, i've also made sure i've got all the correct references ticked.
The code falls over at
With the error "Too few parameters. Expected 1"
I'm sure there's a very simple solution.
Thanks for your help.
Darren.
There's something wrong with the following code that i can't figure out.
Code:
Dim dbs As Database
Dim rst As Recordset
Dim strSQL As String
Me.ToolingPartNumber.SetFocus
strSQL = "SELECT Description FROM Pk_item WHERE PartNumber = " & ToolingPartNumber.Text & ";"
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset(strSQL, dbOpenDynaset)
rst.MoveFirst
Me.PartDescription.Enabled = True
Me.PartDescription.SetFocus
Me.PartDescription.Text = rst!Description
The code falls over at
Code:
Set rst = dbs.OpenRecordset(strSQL, dbOpenDynaset)
With the error "Too few parameters. Expected 1"
I'm sure there's a very simple solution.
Thanks for your help.
Darren.