473,700 Members | 2,384 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 2786
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 all the forms. Also if the user cleared the subform field, I would like the text box on the main...
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 there is a value in the preceding subform record. What I'd like it to do is immediately refresh to
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 with an AutoNumber field once a dispatcher initiates an incident by opening the dispatch form. I have...
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 form's recordset to the second recordset and requery, with the intention that the form will now...
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 selects a year and month that already has a record created, she/he won't know it until access tries to...
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 tab, tabFE, which is on main form frmStudentData. lstPlacements is on tabFE but not on...
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 their own sub-forms inside the Main Form. On the old MDB file, they have a field in the Pledges...
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 same field name in tblRIP... My question is this. When referencing these tables in Visual Basic,...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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 most users, this new feature is actually very convenient. If you want to control the update process,...
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.