By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,513 Members | 1,158 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,513 IT Pros & Developers. It's quick & easy.

Error 3061 : Too few parameters. Expected 2 .. Tried everything.

P: 1
Expand|Select|Wrap|Line Numbers
  1. Private Sub lstglo_Click()
  2. txtglo.Value = lstglo.Value
  3. Dim rs As DAO.Recordset
  4. Dim str As String
  5. txtglo.SetFocus
  6. str = "Select glosssary.meaning,glossary.description, glossary.specification, glossary.hyperlink from Glossary where word = '" & txtglo.Text & "';"
  7. Set rs = CurrentDb.OpenRecordset("Select glosssary.meaning,glossary.description, glossary.specification, glossary.hyperlink from Glossary where word = '" & txtglo.Text & "';")
  8. lblglomean.Caption = rs.Fields("Meaning").Value
  9. lblglodesc.Caption = rs.Fields("Description").Value
  10. lblglospec.Caption = rs.Fields("Specification").Value
  11. lblglohyp.Caption = rs.Fields("Hyperlink").Value
  12. End Sub
Mar 14 '14 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 1,240
ShashankCharati,
Welcome to Bytes. You'll find lots of good help here.

I think your understanding of trying everything is suspect. Here's something very simple you can try, in order to find the problem yourself. Type, or paste, your query into the query editor's SQL view. You can copy this string:

Select glosssary.meaning,glossary.description, glossary.specification, glossary.hyperlink from Glossary where word = 'xyz';

You can open the query editor and find the SQL view by right-clicking in the top half, or in the drop-down view option. Paste the query, go to datasheet view. You should get a fuller explanation of what fields are causing the error.

Jim
Mar 14 '14 #2

Post your reply

Sign in to post your reply or Sign up for a free account.