473,568 Members | 3,124 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Field s("Clerk").Valu e

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 2776
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(Cance l 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

Nov 13 '05 #4

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

Similar topics

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 in the field of the last record entered on the subform. But what its doing is referencing whatever record the user clicked on last before closing...
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 sub form (code in the AfterUpdate Event). Here's the issue. If the user deletes a subform record. The field on the main form shows null even if...
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. The situation is this - I have a dispatch form that is used by dispatchers to track incidents. An incident number is automatically assigned...
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 clicks a button. The form's recordset is then searched and when a matching record is found it is added into a second recordset. Then I set the...
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 that is bound to a table and has no duplicates allowed. the problem is that there are 30 or so other controls here to be filled in and if the user...
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. the fields are on a subform (sfrmEntryPlacements) which populate based on which placement is selected from lstPlacements. sfrmEntryPlacements is on a...
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 with a variable. Below is what I have that works groupHeight = 0 FormHeader = stdHeader formDetail = stdDetail
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 a main table (Mailing List) and a Main Form, and other tables relating to the Mailing List Table (such as Pledges, PhoneNumbers, etc, which have...
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, both tables have a field called fldAsstCoordinator. It's just that the numbers under this field name in tblBase are different from the numbers under the...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.