I am new to Access but have a developer's background on mainframes. After researching several FAQ's and threads in this forum and not finding an answer, I decided to go public with my problem.
I am using Access 2000. I created a form that is made up of a series of fields from one table. In an attempt to populate the fields on this form based on the selection of a value in the key field for this table (an Autonumber project ID), I created a combo box using the wizard.
When I went into form view, the first record in the table was displayed perfectly. When I clicked on the combo box, it listed all the project ID's perfectly. However, when I selected another ID from the combo box list to display a different record, the record didn't change. The form continued to display the first record in the table.
The wizard created the following code for the combo box:
Private Sub Combo76_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ProjectNumber] = " & Str(Me![Combo76])
Me.Bookmark = rs.Bookmark
End Sub
The combo box is unbound. The following data property entries were generated by the wizard based on the options I chose during the process:
Row Source Type = Table/Query.
Row Source = SELECT [ProjectMain].[ProjectNumber] FROM [ProjectMain].
Bound Column = 1.
Limit to List = No.
Auto Expand = Yes.
Enabled = Yes.
Locked = No.
Every other data property is blank.
Any ideas as to what might be wrong?
Thanks, Rooski
I am using Access 2000. I created a form that is made up of a series of fields from one table. In an attempt to populate the fields on this form based on the selection of a value in the key field for this table (an Autonumber project ID), I created a combo box using the wizard.
When I went into form view, the first record in the table was displayed perfectly. When I clicked on the combo box, it listed all the project ID's perfectly. However, when I selected another ID from the combo box list to display a different record, the record didn't change. The form continued to display the first record in the table.
The wizard created the following code for the combo box:
Private Sub Combo76_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ProjectNumber] = " & Str(Me![Combo76])
Me.Bookmark = rs.Bookmark
End Sub
The combo box is unbound. The following data property entries were generated by the wizard based on the options I chose during the process:
Row Source Type = Table/Query.
Row Source = SELECT [ProjectMain].[ProjectNumber] FROM [ProjectMain].
Bound Column = 1.
Limit to List = No.
Auto Expand = Yes.
Enabled = Yes.
Locked = No.
Every other data property is blank.
Any ideas as to what might be wrong?
Thanks, Rooski