S
sleek
Private Sub Item_No_AfterUpdate()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strsql As String
strsql = "SELECT * HAVING Project= " & [Forms]![NDrawing Entry]![Project] &
" AND Partition= " & [Forms]![NDrawing Entry]![Partition] & " AND Section= "
& [Forms]![NDrawing Entry]![Sect] & " AND [Sub Section]= " &
[Forms]![NDrawing Entry]![Sub Sect] & " AND [Drawing No]= " &
[Forms]![NDrawing Entry]![Drawing No] & " AND Type= " & [Forms]![NDrawing
Entry]![Type] & " AND Item No= " & [Forms]![NDrawing Entry]![Drawing
Items].[Form]![Item No] & " AND Rev= " & [Forms]![NDrawing Entry]![Revision]
& ";"
Set db = CurrentDb()
Set rs = db.OpenRecordSet(strsql)
If Not rs.EOF Then
rs.MoveFirst
Me.Supplier = rs![Supplier]
Me.Quantity = rs![Quantity]
Me.Status = rs![Status]
Me.Due_Date = rs![Due Date]
Me.Category = rs![Category]
Me.W_O_No = rs![W/O No]
Me.P_O_No = rs![P/O No]
Me.P_O_Line_No = rs![P/O Line No]
End If
rs.Close
End Sub
The above code is getting a run time error 3075.
Syntax error (missing operator) in query expression. It then goes on to list
the 7 variables along with their values in sql format, but for some reason
the word select is omitted from the from of the code
i.e
* having project =wbf AND partition = A AND...
Help please someone, what is this error and what is causing it. is there a
site with a list of run time errors for access and what causes them?
It would save asking alot of questions
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strsql As String
strsql = "SELECT * HAVING Project= " & [Forms]![NDrawing Entry]![Project] &
" AND Partition= " & [Forms]![NDrawing Entry]![Partition] & " AND Section= "
& [Forms]![NDrawing Entry]![Sect] & " AND [Sub Section]= " &
[Forms]![NDrawing Entry]![Sub Sect] & " AND [Drawing No]= " &
[Forms]![NDrawing Entry]![Drawing No] & " AND Type= " & [Forms]![NDrawing
Entry]![Type] & " AND Item No= " & [Forms]![NDrawing Entry]![Drawing
Items].[Form]![Item No] & " AND Rev= " & [Forms]![NDrawing Entry]![Revision]
& ";"
Set db = CurrentDb()
Set rs = db.OpenRecordSet(strsql)
If Not rs.EOF Then
rs.MoveFirst
Me.Supplier = rs![Supplier]
Me.Quantity = rs![Quantity]
Me.Status = rs![Status]
Me.Due_Date = rs![Due Date]
Me.Category = rs![Category]
Me.W_O_No = rs![W/O No]
Me.P_O_No = rs![P/O No]
Me.P_O_Line_No = rs![P/O Line No]
End If
rs.Close
End Sub
The above code is getting a run time error 3075.
Syntax error (missing operator) in query expression. It then goes on to list
the 7 variables along with their values in sql format, but for some reason
the word select is omitted from the from of the code
i.e
* having project =wbf AND partition = A AND...
Help please someone, what is this error and what is causing it. is there a
site with a list of run time errors for access and what causes them?
It would save asking alot of questions