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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple recordsets...

Status
Not open for further replies.

mRcooper

Programmer
Dec 12, 2002
6
GB
Hi,

I currently have several forms open, each with their own recordset. One of my forms controls what record each form looks at...i.e syncing each form to a unique serial number. However, I cannot get my 'Add Record' button on my control form to jump all of the existing forms to the new record.
Any ideas?

This is complicated and will require control of recordsets.
 
Depends how you have set all the child forms up.

If its bound
- how did you do that?
- can you send an sql statement with the filter on it to the forms?

If its unbound
- change the sql statement and refresh the data on the screen

As to add record
- you might need to change the forms rights (to allow it to add records on bound forms)
- For unbound, just set the unique ID on each form and refresh. Possibly create empty records on that unique ID first.


Vince
 
My forms aren't bound, I have used the following code to change directly the recordset on the other forms...

rsIS2Assembly.FindLast "[SerialNumber] = '" & SerialNumber & "'"
If Not rsIS2Assembly.EOF Then Forms![fProductionBuildIS2_Assembly].Bookmark = rsIS2Assembly.Bookmark
rsIS2Assembly.Close

What I want is to use the rs.AddNew command on all recordsets and then jump to the new record. However, this creates problems due to some 'Required' fields in my tables.
 
Right. Those fields are required. You'll have to supply data to those fields. Without seeing the code you're using, it won't do much good for people to speculate in much more detail.

Why are you running so many forms related to one record? Sounds a little sketchy. If you describe what you're doing you might get some suggestions that could help you simplify the whole thing.

Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developers' section of the site for some helpful fundamentals.
 
The reason i'm running several forms is because I'm breaking up an original big form into smaller ones...kind of like a suite of windows, each used for a different application, but relating to the same data. It works really well at the mo and is very quick! Although I can't add records correctly.

However, i'm working on a fix at the mo, so I might have sovled my problem by going right back to basics :) If it works, i'll keep u updated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top