473,382 Members | 1,359 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,382 software developers and data experts.

Taking data from one table and inserting into another through forms

I am preparing a database for a survey. For ease, I break the table into different ones like a BaseTable with HouseNo, OwnerName, Address, a HouseTable with HouseNo, OccupantNo, Ownership, MaleNo, FemaleNo, BirthNo, DeathNo, etc, . The HouseNo is taken as the Primary key in all tables and I have created one-to-one relationship between BaseTable and all other tables. I have also created forms based on all the tables for data entry. What I want to do now is:

I will enter house no, name of owner, address of owner, etc in the BaseForm and from the BaseForm I'll navigate to the HouseForm. In the HouseForm, I want the house no which I entered in the BaseForm to be displayed and also this house no should be inserted into the HouseTable when I move on to the next Form. How can I do this?

Thanks in advance.
Jul 4 '07 #1
6 1607
Rabbit
12,516 Expert Mod 8TB
When you open the form, pass the house number in the OpenArgs parameter.
Jul 4 '07 #2
nico5038
3,080 Expert 2GB
By making the BaseTableinto a MainForm and using the other tables as linked subforms, you can get the additional tables with the same house no filled automatically.
All you would need to do is to limit the number of entries in the subform to one, or you would need to insert for all tables a new entry when adding a new house no and set the subforms to "no additions allowed".

Nic;o)
Jul 4 '07 #3
Thanks for the reply. There is a button in BaseForm which opens the HouseForm and simultaneously closes the BaseForm. I tried the openargs parameter of the openform method of this button. I gave the argument as HouseNo = BaseForm.HouseNo. Not sure whether the code is correct. Could you please comment?

There was another reply to my question - to make all other forms as subforms. But I don't want that b'coz I don't have much idea about subforms.

Thanks in advance,
Jul 9 '07 #4
Rabbit
12,516 Expert Mod 8TB
OpenArgs by itself does nothing. It only stores a value. In the form that opens you need code that will fill in the value for you in the On Load event.
Jul 9 '07 #5
nico5038
3,080 Expert 2GB
Just use the subform button from the toolbox and follow the wizard.
When it proposes to link the subform, accept the proposed field and see the effect.

Nic;o)
Jul 9 '07 #6
Rabbit
12,516 Expert Mod 8TB
I suggest you do what nico is proposing, it'd be a lot easier to use the subform wizard than try to figure out how to use openargs correctly.
Jul 9 '07 #7

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

Similar topics

25
by: kie | last post by:
hello, i have a table that creates and deletes rows dynamically using createElement, appendChild, removeChild. when i have added the required amount of rows and input my data, i would like to...
3
by: Chris | last post by:
Could someone please provide me an effective means of exporting data from a data set (or data grid) to Excel?
2
by: Josh Strickland | last post by:
I am attempting to create an Access database which uses forms to enter data. The issue I am having is returning the query results from the Stored Procedure back in to the Access Form. ...
7
by: Aravind | last post by:
Hi folks. I have 2 forms, frmBorrow and frmHistory frmBorrow has an unbound multi-column combo box (cboMember) and 7 unbound text boxes (MemNo, MemName, MemIC, MemType, CourseFaculty, Borrow,...
2
by: headware | last post by:
I'm relatively new to ASP.NET and ADO.NET, but I have a basic design question regarding the use of web services and APS.NET applications. Right now we have an application that uses web services to...
5
by: Chris | last post by:
I have a meetings section I'm developing on our intranet. Using PHP/MySQL. Meeting info and Meeting docs reside on 2 related tables in the db. Users may want to upload anywhere from 1 to 10 or...
4
by: Michel Esber | last post by:
Hello, DB2 V8 LUW FP 11. My applications eventually takes a very long time to process simple insert statements. Here´s the output of a event monitor: Text : INSERT INTO MyTable...
7
by: ebindia0041 | last post by:
This is like the bug from hell. It is kind of hard to explain, so please bear with me. Background Info: SQL Server 7.0, Asp.net 1.1 with c# I'm inserting simple records into a table. But one...
2
by: AlexanderDeLarge | last post by:
Hi! I got a problem that's driving me crazy and I'm desperately in need of help. I'll explain my scenario: I'm doing a database driven site for a band, I got these tables for their discography...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.