S
Samantha
The purpose of my database is to store information on our
projects. I have a form that is used to enter new projects
and their related information. It also has a combo box on
it that displays a list of existing projects. The user can
choose from this list and the info from that selected
project then displays on the form allowing the user to
make changes.
There is often duplicate information among the projects,
such as the client name, address, etc. I have added
a "duplicate" button to the form so we can copy projects
and change the necessary info but it isn't working
correctly. I chose "debug" when I was given the error and
found that it is due to the code that is in the
AfterUpdate event of the combo box. The code is as follows:
Private Sub Combo220_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Project Number] = '" & Me![Combo220]
& "'"
Me.Bookmark = rs.Bookmark
End Sub
It is the last line (Me.Bookmark = rs.Bookmar) that is
causing the problem. When I deleted this line I was able
to run the copy command, however, the combo button no
longer works right - it doesn't fill the form in according
to the selected project from the combo box.
I need both the combo box and the copy button to work
correctly. Any help would be appreciated.
Thanks, Samantha
projects. I have a form that is used to enter new projects
and their related information. It also has a combo box on
it that displays a list of existing projects. The user can
choose from this list and the info from that selected
project then displays on the form allowing the user to
make changes.
There is often duplicate information among the projects,
such as the client name, address, etc. I have added
a "duplicate" button to the form so we can copy projects
and change the necessary info but it isn't working
correctly. I chose "debug" when I was given the error and
found that it is due to the code that is in the
AfterUpdate event of the combo box. The code is as follows:
Private Sub Combo220_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Project Number] = '" & Me![Combo220]
& "'"
Me.Bookmark = rs.Bookmark
End Sub
It is the last line (Me.Bookmark = rs.Bookmar) that is
causing the problem. When I deleted this line I was able
to run the copy command, however, the combo button no
longer works right - it doesn't fill the form in according
to the selected project from the combo box.
I need both the combo box and the copy button to work
correctly. Any help would be appreciated.
Thanks, Samantha