Results 1 to 2 of 2

Thread: MSDB: Findfast

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 1999
    Posts
    127

    Post

    I posted awhile back about this problem, and now I'm giving an update since I still can't seem to solve the probelm.

    I'm creating a database to handle orders, NOT a pos system. The database that I'm using has tables defined with the primary keys as "Customer ID", "Buisness ID", "Order ID", etc.., all defined as long integers.
    When I try to compare an integer to the values in these fields, it keeps coming back with an incorrect data type error.

    The comparision code that I'm using is as follows:

    with datBuisness.recordset
    frmCustomers.datCustomers.Recordset.FindFirst ("'Customer ID' = " & .Fields("Customer ID").Value)
    frmOrders.cmdRelatedName.Caption = _
    frmCustomers.datCustomers.Recordset.Fields("First Name").Value & " " & _
    frmCustomers.datCustomers.Recordset.Fields("Last Name").Value

    When it gets to the findfirst command, it gives the error message: Run-time error '3464': Data type mismatch in criteria expression.

    Any ideas on how to fix this?

    P.S. it looks like its a repetitive expression, but in the datCustomers, "Customer ID" is the primary key, for datBuisness, "Customer ID" is just another integer field.

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    Hmmm....

    try putting brackets around 'Customer ID'

    ex

    ("[Customer ID] = " & .Fields("Customer ID").Value)

    also check and make sure you have a value for the customer ID here.....

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