472,952 Members | 2,075 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,952 software developers and data experts.

Create New Records in Table

I have a form which is based on a table (a) with over 6000 records.I have a
button on this form which will open another form with related data from
another table (b). What I want to do is open the second form and see the
related data or if it hasnt got any related data create a new record in
table (b) so that I can input data.
If possible I dont want to create a one to one relationship between the
tables but create the new records in table (b) when I press the button.
Is this possible or do I have to create a link between the tables on a 1
to 1 basis. I dont really want to do this as the second table(b) will only
have about 1000 records linked to table (a)
Many thanks in advance
Dave
Nov 12 '05 #1
1 2459
You can tell the second form about the primary key of the first form
using the OpenArgs parameter of the DoCmd.OpenForm method. Use the
second form's OnOpen event to do some processing depending on the
value passed to it using OpenArgs. Alternatively, you can use the
Where parameter of the OpenForm method to filter the records of the
second form.

Both of these are more work than the 1:1 relation. If you are
concerned about it, a 1:1 relation does not necessarily mean the
second table contains all 6000 records. the 1000 records is perfectly
acceptable.
On Thu, 26 Feb 2004 00:36:43 +0000 (UTC), "Dave"
<da***********@btinetrnet.com> wrote:
I have a form which is based on a table (a) with over 6000 records.I have a
button on this form which will open another form with related data from
another table (b). What I want to do is open the second form and see the
related data or if it hasnt got any related data create a new record in
table (b) so that I can input data.
If possible I dont want to create a one to one relationship between the
tables but create the new records in table (b) when I press the button.
Is this possible or do I have to create a link between the tables on a 1
to 1 basis. I dont really want to do this as the second table(b) will only
have about 1000 records linked to table (a)
Many thanks in advance
Dave

**********************
ja**************@telusTELUS.net
remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security
Nov 12 '05 #2

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

Similar topics

3
by: Peter Phelps | last post by:
My problem is as follows: I need automatically iterate through a single field in a table and use the values in the field to create an in-statement. Currently, the character limitation in the...
0
by: Jonathan Fisher | last post by:
Whatıs the appropriate way to create records in related, subsidiary tables when a record is created in a main table? Iım using Access 2000, and I have a main table called tblProject, and a few...
10
by: Mark | last post by:
I have a table about people containing 25 fields. The table contains the usual fields - first, last, address, city, state and zip. There is no primary key. These fields all have data with the...
2
by: Alicia | last post by:
Does anyone know why I am getting a "Syntax error in Create Table statement". I am using Microsoft Access SQL View to enter it. Any other problems I may run into? CREATE TABLE weeks (...
3
by: Miya | last post by:
I am building a calendar to enter and display training courses. I have a table with the fields CourseID, TrainingDate, TrainingStartTime and TrainingEndTime. Some courses are one day while others...
12
by: GCM | last post by:
Hi, I have a table that has the following fields; LName, FName and MName. Also there are other fields in the table. I need to create another table with those fields combined as "Trim( & " " & &...
27
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
3
by: suek | last post by:
I have a table with over 4000 records to search upon, and the users don't like a combo box. So what I have been trying to do for the last twelve hours is do some code to get a text box to search. ...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.