Results 1 to 2 of 2

Thread: Too Few Parameters Expected 1.

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 1999
    Location
    Chester, NJ, Morris
    Posts
    12

    Post

    Too Few Parameters Expected 1.

    Boy am I starting to hate seeing this message! What am I doing Wrong?

    Private Sub Form_Activate()

    dim sName as string
    sName = "cmbType"

    data3.DatabaseName = globalvarDB
    Data3.RecordSource = "SELECT Codename FROM CodeMstr where NameofField = " & sName
    Data3.Refresh
    End Sub

    I am using a data control with an Access database that has a table called CodeMstr and and one of the fields is called NameofField which contains records that include "cmbtype". The databasename is also specified from a globalvar. Help! Am I overlooking something stupid?

  2. #2
    Junior Member
    Join Date
    Jun 1999
    Location
    Papillion, NE, USA
    Posts
    21

    Post

    try the following:


    Data3.RecordSource = "SELECT Codename FROM CodeMstr where NameofField = '" & sName & "'"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width