473,769 Members | 3,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is there a way to enter data into a subform before you enter into main form?

99 New Member
Here's a strange situation:

I'm building an application that contains a One-To-Many relationship, and the application has a main form with a sub form to maintain the relationship for data entry.

In the "one" table are home page URLs of websites like:
www.BusinessSit e.com

In the "many" table are URLs for other pages under the "One" domain like:
www.BusinessSit e.com/folderName/PageInSite.html

I noticed that if you enter the "many" URL into the form first, you can extract the home page, and you don't have to spend time entering the data twice.

But to accomplish this, I'll have to enter data into the subform BEFORE I enter data into the mainform.

Is there a way to do this?

Thanks,
Adam
Nov 10 '09 #1
4 2860
mshmyob
904 Recognized Expert Contributor
@AdamOnAccess
I understand what you want but I am thinking why don't you just enter the protocol and host name in the one table (main form) and just the paths and parameters in the many table (subform) instead of typing the protocol and host name over and over.

So the main form has 'www.BusinessSi te.com while the subform just stores

folderName/Page1.html
folderName/Page2.html
etc.

Just my 2 cents.

cheers,
Nov 11 '09 #2
missinglinq
3,532 Recognized Expert Specialist
In Access, as in the Animal Kingdom, you cannot have a "child" before you have a "parent."

The homepage URL needs to be in the main form's recordsource as the Primary Key, in the subform's recordsource as a Foreign Key, with the main form/subform being linked thru these two fields.

You enter the home page URL in the main form and it will automatically be entered in the subform records without any user effort. You don't say what you're doing with the subform data, but whatever it is, you can simply concatenate the Foreign Key field and the rest of the URL for the individual pages of the site.

Linq ;0)>
Nov 11 '09 #3
AdamOnAccess
99 New Member
@mshmyob
Hi Mshmyob, Linq,

The above idea did occur to me, but I saw that the relationship didn't always hold up. There are many cases where the main URL appears differently in sub URLs. The feature I'm considering would probably come into play about 70% of the time.

I did come up with a good solution last night:

In cases where I can extract the main URL from the sub URL, I copy the sub URL from the browser, paste it into the first field of the main form, and hit return. Now I have a parent record. The AfterUpdate Event of this first field triggers a procedure to take the contents of this field in the main form and places it in the proper field in the sub form, then procedure extracts the main URL and simply re-writes the data in the main form. The procedure finishes by setting focus on the first field in the sub form.

This actually works out better because I've designed the AfterUpdate procedure to fire only in cases when it receives a Sub URL. I can still enter slightly different main urls into the main form, and the procedure will just ignore them.

-Thanks for the help!
-Adam
Nov 11 '09 #4
missinglinq
3,532 Recognized Expert Specialist
Glad you got it working for you.

Linq ;0)>
Nov 11 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

32
3228
by: Neil Ginsberg | last post by:
We're using SQL Server 7 with an Access 2000 MDB as a front end with ODBC linked tables. I recently created a new set of tables for the app, and users are complaining that unsaved data is being lost when they move to a new record. This seems to be the case when there are multiple users. When there is a single user using it, we don't seem to have that problem. It seems that we had this problem when we first converted from an MDB back end...
1
2405
by: jbroome | last post by:
I have several tables that contain the same information as Identifying records but then with additional info that differs from table to table. e.g. 1 database of school students with their relevent info Another dbase with subject info and grades etc assigned to the students info I wish to use one form to enter data into all tables. The differing infos not a problem but I am unable to input Firstname and Surname
1
2512
by: Traci | last post by:
My problem is in a form/subform. On the main form I have an unbound listbox named OptionsInPlan. In the OnCurrent event of the main form I set the value of the listbox with the code: Me!OptionsInPlan.Value = Me!OptionsInPlan.ItemData(0) For some records there are no rows in the listbox. I want to have the subform track the value of the listbox so I set the LinkMaster property to OptionsInPlan and the LinkChild property to ElevationID....
1
3523
by: Susan | last post by:
I have a bound form and subform and am trying to enter the data in both forms programatically. The Linkmaster and Linkchild properties are set. My intent is to be able to look at the data before it is saved and then choose to save it or undo it. I have a Save button that just closes the form and a Cancel button that does an undo and then closes the form. I first enter data into the main form and then enter code into the subform. After the...
6
2980
by: Wayne | last post by:
I am designing a database which needs approximately 50 fields per record. The database user requires data entry to be via a single screen. If I follow good database design practice and split the 50 fields into several smaller tables, is there any other way to enter the data on the single data entry screen other than having several subforms with the individual tables as their recordsource?
1
2171
by: savas_karaduman | last post by:
There is a subform embedded into a Main Form... Subform is standing for entering data into a table... There is a combobox on the Main Form... How Combo Box value can be added into table to which we enter data from subform? I mean, when you enter 10 new items in the subform, combo box value should take place for a specific column ot that table for every new 10 item... Am I clear?
3
7701
by: Darin | last post by:
I have a problem I just can't figure out. I have a form with a subform, and the recordsource of the subform has criteria based on some unbound fields in the parent form so that data in the parent form affects data in the subform. I've had this type of setup often, but I've run across a couple forms where this has caused an "enter parameter value" pop up for each reference to the parent control in the query when the main form is closed. ...
4
8148
by: jmartmem | last post by:
I have an Access 2002 main form ("Project Initiation Checklist") with a subform ("sfPICMilestone"). The Link Child Field is ID and the Link Master Field is also ID. The linked field is an auto-generated number and the main form's primary key. I'm having problems with my subform such that when I attempt to enter or edit data in its text boxes, its as if the subform is locked. Similarly, all controls on the main form are also locked. I can...
1
4698
by: janekelly111 | last post by:
I have a main form with one subform linked by a one-to-many relationship on one field only. The main form;s recordsource is a query determined and assigned from a command button on a "Find" form with drop down boxes - i'e the form is populated with data fram an appropriate query according to the criteria selected. The button opens the main/subform but I get an "Enter parameter value" dialog box asking for the link field. If I click OK...
0
9579
marktang
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...
0
9422
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,...
0
10035
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 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...
1
9984
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,...
0
6662
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();...
0
5293
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...
0
5441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3949
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
3
2811
bsmnconsultancy
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.