472,353 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Referencing main form recordset field?

This code from the subform works for getting the value of a field of
the main form named "WorkSheet":
MsgBox Form_WorkSheet.Recordset.Fields("Clerk").Value

Each record in the mainform datasheet called "WorkSheet" has a subform.
I am trying to get the controls on the subform to reference the fields
in the main form, because I think that it will resolve some of my write
conflict problems by not having a recordset for the subform, and
instead just referencing the Recordset of the main form.

Is there some syntax I can use in the "Control Source" property that
will let me access the "Clerk" field of the mainform's recordset? Or
can I get the same effect by assigning the recordset of the mainform to
the subform? I'm not sure how to do that. Or will I have to write
code into the subform controls' events like I posted at the beginning
to access each field individually?

Nov 13 '05 #1
3 2694
I hadn't thought of assigning the entire recordset until I had gotten
half way through writing the above post. It and it seems to work, but
it is querky in the way the subform fills in the data.

Should I be doing that in the onload or onopen event of the form?

One querk is that in a user editable textbox, the text from the
database doesn't appear until the user clicks in the textbox, and then
if they edit the text, click away from the textbox, the textbox reverts
back to the way it appeared before they edited it, but the editing IS
saved when the record is saved, and will show up next time the click in
the textbox.

Nov 13 '05 #2
Ok, this isn't working. In the subform I have:

Private Sub Form_Open(Cancel As Integer)
Set Me.Recordset = Form_WorkSheet.Recordset
End Sub

But each subform for each record displays the values of the currently
selected record, not of the record it is a subform of. So it seems the
recordset is not a set of records, but just a single record?

Nov 13 '05 #3
I gave up on this, as Access is doing so much junk behind the scenes
that I don't want it to that I felt like I had no control over the
situation.

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a main form with a continuous subform. On the main form I have a text box that references a field on the...
9
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a main form with a continuous subform. On the main form I have a text field called . It gets populated...
8
by: J. Black | last post by:
Hello everyone - I've been developing an incident tracking and reporting system for an emergency services outfit that I work with part time. ...
2
by: jodyblau | last post by:
I am trying to change the recordset that my form uses, but when I requery my form, all of the textboxes display #Name? Here is what I am trying...
6
by: kaosyeti | last post by:
hey.... i have a duplicate record issue i could use some help with. on a form that has 2 unbound controls, txtboxyear and cboxmonth, together will...
9
by: freeskier | last post by:
I am working on a form to edit student field placements. the student is selected from a combo box (cboStudent) which then populates a list...
3
by: 150563a | last post by:
I have a form that has 5 sub forms on it. I want to know how to reference the form properties of these sub forms. This I can do but what I am...
4
by: MikeBreslin | last post by:
Forgive me, I'm a newb at this, but I'm trying to help a charitable organization who have migrated their database from an Access 2000 MDB file to SQL...
7
patjones
by: patjones | last post by:
Hi: I have two tables in my Access database, tblBase and tblRIP. Both of these tables have field names in common. The fields contain different...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.