Consulting

Results 1 to 2 of 2

Thread: Solved: Update Query

  1. #1
    VBAX Newbie
    Joined
    May 2012
    Posts
    4
    Location

    Solved: Update Query

    Hi,

    I'm trying to update a record in my database.
    This is the query:

    [vba]
    Dim UpdateQuery As String
    Dim currentOfferteNummer As Long
    currentOfferteNummer = (Form_Main.Hidden2)

    UpdateQuery = "UPDATE [Offerte Items] SET [Item 1] = 'test' WHERE [Offertenummer] = '" & currentOfferteNummer & "'"[/vba]
    When i run this query, i get the following error message:
    "Data Type Mismatch in criteria expression"


    I'v checked both datatypes.
    Offertenummer is defined as a Number(long int), same as the variable 'currentOfferteNummer'

    I don't know why i get this error message

  2. #2
    VBAX Newbie
    Joined
    May 2012
    Posts
    4
    Location
    I've solved it by using the Query designer and switch to sql view to get a working code

Posting Permissions

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