help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • khan

    help

    getting, error, 3075
    Syntax Error (Missing Operator) in query expression '8WHERE
    [Products].[ProductID]=1'

    Dim TotalQty As Integer


    TotalQty = DLookup("[QtyOnHand]", "[Products]", "[ProductID]=" &
    Forms![tblProductUpdat e]![ProductID])
    If (TotalQty - [Quantity]) < 8 Then
    MsgBox "Inventory Below 0. Quantity Issued is To High!"
    Cancel = True
    Exit Sub
    End If
    TotalQty = TotalQty - [Quantity]
    DoCmd.SetWarnin gs False
    DoCmd.RunSQL ("UPDATE [Products] SET [Products].[QtyOnHand] =" &
    TotalQty & _
    "WHERE [Products].[ProductID] = " &
    Forms![tblProductUpdat e]![ProductID])

    AM i MISSING SOME THING in UPDATE QUERY

  • Randy Harris

    #2
    Re: help


    "khan" <ahmad336@gmail .com> wrote in message
    news:1115231205 .057764.5890@z1 4g2000cwz.googl egroups.com...[color=blue]
    > getting, error, 3075
    > Syntax Error (Missing Operator) in query expression '8WHERE
    > [Products].[ProductID]=1'
    >
    > Dim TotalQty As Integer
    >
    >
    > TotalQty = DLookup("[QtyOnHand]", "[Products]", "[ProductID]=" &
    > Forms![tblProductUpdat e]![ProductID])
    > If (TotalQty - [Quantity]) < 8 Then
    > MsgBox "Inventory Below 0. Quantity Issued is To High!"
    > Cancel = True
    > Exit Sub
    > End If
    > TotalQty = TotalQty - [Quantity]
    > DoCmd.SetWarnin gs False
    > DoCmd.RunSQL ("UPDATE [Products] SET [Products].[QtyOnHand] =" &
    > TotalQty & _
    > "WHERE [Products].[ProductID] = " &
    > Forms![tblProductUpdat e]![ProductID])
    >
    > AM i MISSING SOME THING in UPDATE QUERY
    >[/color]

    You have posted this same message with different subjects at least for
    times. That is extremely rude. Your question has been answered elsewhere.


    Comment

    • Randy Harris

      #3
      Re: help


      "Randy Harris" <randy@SpamFree .com> wrote in message
      news:xO8ee.1457 $Jz2.773@newssv r19.news.prodig y.com...[color=blue]
      >
      > "khan" <ahmad336@gmail .com> wrote in message
      > news:1115231205 .057764.5890@z1 4g2000cwz.googl egroups.com...[color=green]
      > > getting, error, 3075
      > > Syntax Error (Missing Operator) in query expression '8WHERE
      > > [Products].[ProductID]=1'
      > >
      > > Dim TotalQty As Integer
      > >
      > >
      > > TotalQty = DLookup("[QtyOnHand]", "[Products]", "[ProductID]=" &
      > > Forms![tblProductUpdat e]![ProductID])
      > > If (TotalQty - [Quantity]) < 8 Then
      > > MsgBox "Inventory Below 0. Quantity Issued is To High!"
      > > Cancel = True
      > > Exit Sub
      > > End If
      > > TotalQty = TotalQty - [Quantity]
      > > DoCmd.SetWarnin gs False
      > > DoCmd.RunSQL ("UPDATE [Products] SET [Products].[QtyOnHand] =" &
      > > TotalQty & _
      > > "WHERE [Products].[ProductID] = " &
      > > Forms![tblProductUpdat e]![ProductID])
      > >
      > > AM i MISSING SOME THING in UPDATE QUERY
      > >[/color]
      >
      > You have posted this same message with different subjects at least for
      > times. That is extremely rude. Your question has been answered[/color]
      elsewhere.
      Make that four times.


      Comment

      Working...