I am attempting to fill fields in the Recomm form (to Recomm table) from the Institutions table. I only need to fill certain fields on the form if the record is contained in the institution table (See attached graphic)
I am not sure that I am doing this right (do I need to add the beginning of the institution name in Organization field or just click on the institution link
Private Sub Institutions_Click()
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset(Institutions, dbOpenSnapshot)
rst.FindFirst ("[Institution] = " & Institution.Value)
Institution.Value = rst.Organization
Address.Value = rst.Address
City.Value = City
State.Value = State
ZIP.Value = ZIP
Country.Value = Country
Set rst = CurrentDb.OpenRecordset(Institutions)
End Sub
The code keeps hanging on "institution.value=rst.Organization" line
I am not sure that I am doing this right (do I need to add the beginning of the institution name in Organization field or just click on the institution link
Private Sub Institutions_Click()
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset(Institutions, dbOpenSnapshot)
rst.FindFirst ("[Institution] = " & Institution.Value)
Institution.Value = rst.Organization
Address.Value = rst.Address
City.Value = City
State.Value = State
ZIP.Value = ZIP
Country.Value = Country
Set rst = CurrentDb.OpenRecordset(Institutions)
End Sub
The code keeps hanging on "institution.value=rst.Organization" line
