Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combo boxes, tables & "Me.Bookmark = rs.Bookmark"

Status
Not open for further replies.

rvmams

Technical User
Jan 28, 2003
22
0
0
GB
I am trying to make a database to keep track of projects.
I have two combo boxes on my form, one for clients, one for projects and a lot of text boxes, for specific project details (budget, milestones etc).

The first combo box helps to filter the second one, so that if I pick a client I'll only see projects related to that client in the second combo box. Furthermore, if I select a project the correct record shows on my form.

It all works like a charm, and that is mostly thanks to the amazing help of this forum!!!! Thanks!

But here is the problem, it currently works because the form only uses a single table as a source. I need to use multiple tables though. I tried out all kind of variations but it keeps coming up with the same error in the code.

I can understand, why this is hapening but I do not know what the solution is. Here is the code:

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

Set rs = Me.Recordset.Clone
rs.FindFirst "[Project Name] = '" & Me![Combo84] & "'"
Me.Bookmark = rs.Bookmark
Me.Combo84.Requery
End Sub

The line "Me.Bookmark = rs.Bookmark" is what gives the trouble, but I do not know how to rewrite it... any suggestions?
 
Hi

You say:

"The line "Me.Bookmark = rs.Bookmark" is what gives the trouble, but I do not know how to rewrite it... "

could you elaborate with for example an error message?

Also when you say 'several tables' do you mean several related tables?

If yes, have you tried making a query based on the tables and use that as the recordsource for your form?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
The error message says:

Run time error 3021:

No current record

Thnx for your help Ken!!! I'll try out your suggestion of a query, this might be the answer!

Rgds,

Roger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top