473,418 Members | 4,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 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 2762
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 subform. What I'd like it to do is show the value...
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 based on what the user selects in a field on the...
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. It's going well, except for one fly in the ointment....
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 to do: The user enters a search term in a textbox...
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 automatically fill in an invisible txtboxdate...
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 box(lstPlacements) with field placements for that student....
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 having trouble with is substituting the form name...
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 Server Express via an Access ADP file. They have...
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 data, but simply have the same names. For example,...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.