elitts


Ok, I have no knowledge of VB. I am attempting to co-opt a bit of someone elses database. I am using 2 combo boxs in a form header to search for a specific record using 2 different fields. If the record exists than the fields in the detail section of the form are filled in. If it isn't located then nothing happens.

One of the two fields is a key field with a numberic autonumber. This search works just fine.
The second field is not a key field, it is a name. This one gives me:

Run-time Error "3079" The specified field "Name" could refer to more than one table listed in the FROM clause of your SQL statement.

I only have 2 tables in this database, and the field "Name" only exists in one of the 2 tables.

Any help is greatly appreciated.


Here is the VB code from the original database.

Private Sub Combo64_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

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

Private Sub Combo66_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Name] = '" & Me![Combo66] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub



Re: Using VB in MS Access

elitts


Anyone any ideas





Re: Using VB in MS Access

Toblerone

Hi elitts,

Can you post the SQL attached to that form please