Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Hoping for someone more knowledgeable than I

$
0
0
Good Afternoon,

Let me start off by saying I'm a novice at using MS Access for anything more than combining 2 unrelated data sources.

I know Oracle SQL and Java but VBA syntax is killing me.

That being said, I'm building a DB for work and one of the forms I'm building cascading filters in the header that populate the record to be modified in the form below.

I got everything to work using 1 Combo Box, but the when adding the cascade filters I keep getting a Syntax Error

"(missing operator) in query expression 'Model Master!Device Model Number'"

Below is the script, Combo 51 lets me choose an OEM, Combo should let me choose from the models on Model Master with OEM_CD = Combo51.value

Listbox 47 lets me pick an issue will will drive the form population. (Also I need to make sure the form populates based on the choices from Combo49 and Listbox47)

Can someone tell me what the operator error is?

Private Sub Combo51_AfterUpdate()
On Error Resume Next
Combo49.RowSource = "Select Model Master!Device Model Number " & _
"FROM Model Master " & _
"WHERE Model Master!OEM_CD = '" & Combo51.Value & "' " & _
"ORDER BY Model Master!Device Model Number;"
End Sub

Private Sub Combo49_AfterUpdate()

On Error Resume Next
List47.RowSource = "Select [Guidance Tracker]![Issue] " & _
"FROM [Guidance Tracker] " & _
"WHERE [Guidance Tracker]![Device Model Number] = '" & Combo49.Value & "' " & _
"ORDER BY [Guidance Tracker]![Issue];"
End Sub

Private Sub List47_AfterUpdate()

Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Str(Nz(Me![List47], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

End Sub

Viewing all articles
Browse latest Browse all 13329

Trending Articles