Here and there

F

Firz

Hi there,

Is it possible to have data captured in 2 different forms? Considering the
user only entered the data through 1 form?
 
F

Firz

ok, I've two tables. Table1 and table2. Form1 is for Table1 while Form2 is
for table2. Form1 is the main one while form2 is linked to form1 by a primary
key in table1 called "Registration no". My question is,
let's say a user fill in the entries in form2, is it possible that form1
captures it as well?

E.g User enter the details of "Country" in Form2. Let's say there are 2
countries for that particular registration number. Is there any code or ways
so that in Form1, the number "2" will be captured automatically in my "No. of
countries selected" field?
 
S

scubadiver

Do the tables have a 1-to-many relationship (main form/sub form)?

In the sub form simply put the following into a text box

=RecordsetClone.RecordCount

and give it a name ("other" property tab).

In the main form insert a text box

=[forms]![form name]![subform name].form![fieldname]

OR you may be able to simply put

=[forms]![form name]![subform name].RecordsetClone.RecordCount

in the main form text box.

Hoping that helps.
 
F

Firz

One is not a subform of another. They are seperate forms. So do the codes
still apply?


scubadiver said:
Do the tables have a 1-to-many relationship (main form/sub form)?

In the sub form simply put the following into a text box

=RecordsetClone.RecordCount

and give it a name ("other" property tab).

In the main form insert a text box

=[forms]![form name]![subform name].form![fieldname]

OR you may be able to simply put

=[forms]![form name]![subform name].RecordsetClone.RecordCount

in the main form text box.

Hoping that helps.



--

The 11th day of every month:

http://truthaction.org/forum/index.php


Firz said:
ok, I've two tables. Table1 and table2. Form1 is for Table1 while Form2 is
for table2. Form1 is the main one while form2 is linked to form1 by a primary
key in table1 called "Registration no". My question is,
let's say a user fill in the entries in form2, is it possible that form1
captures it as well?

E.g User enter the details of "Country" in Form2. Let's say there are 2
countries for that particular registration number. Is there any code or ways
so that in Form1, the number "2" will be captured automatically in my "No. of
countries selected" field?
 
F

Firz

It is not a subform of another. They are two separate forms. So do the codes
still apply?

scubadiver said:
Do the tables have a 1-to-many relationship (main form/sub form)?

In the sub form simply put the following into a text box

=RecordsetClone.RecordCount

and give it a name ("other" property tab).

In the main form insert a text box

=[forms]![form name]![subform name].form![fieldname]

OR you may be able to simply put

=[forms]![form name]![subform name].RecordsetClone.RecordCount

in the main form text box.

Hoping that helps.



--

The 11th day of every month:

http://truthaction.org/forum/index.php


Firz said:
ok, I've two tables. Table1 and table2. Form1 is for Table1 while Form2 is
for table2. Form1 is the main one while form2 is linked to form1 by a primary
key in table1 called "Registration no". My question is,
let's say a user fill in the entries in form2, is it possible that form1
captures it as well?

E.g User enter the details of "Country" in Form2. Let's say there are 2
countries for that particular registration number. Is there any code or ways
so that in Form1, the number "2" will be captured automatically in my "No. of
countries selected" field?
 
S

scubadiver

So table1 has a primary key that means table2 has a foreign key? If each
registration number has more than one country that is a 1-to-many
relationship.




Firz said:
It is not a subform of another. They are two separate forms. So do the codes
still apply?

scubadiver said:
Do the tables have a 1-to-many relationship (main form/sub form)?

In the sub form simply put the following into a text box

=RecordsetClone.RecordCount

and give it a name ("other" property tab).

In the main form insert a text box

=[forms]![form name]![subform name].form![fieldname]

OR you may be able to simply put

=[forms]![form name]![subform name].RecordsetClone.RecordCount

in the main form text box.

Hoping that helps.



--

The 11th day of every month:

http://truthaction.org/forum/index.php


Firz said:
ok, I've two tables. Table1 and table2. Form1 is for Table1 while Form2 is
for table2. Form1 is the main one while form2 is linked to form1 by a primary
key in table1 called "Registration no". My question is,
let's say a user fill in the entries in form2, is it possible that form1
captures it as well?

E.g User enter the details of "Country" in Form2. Let's say there are 2
countries for that particular registration number. Is there any code or ways
so that in Form1, the number "2" will be captured automatically in my "No. of
countries selected" field?

:


Sounds like this is a design issue. Please explain...

--

The 11th day of every month:

http://truthaction.org/forum/index.php


:

Hi there,

Is it possible to have data captured in 2 different forms? Considering the
user only entered the data through 1 form?
 
D

Douglas J. Steele

Forms are strictly windows into the tables. The data does not exist on the
forms: it exists in the tables. As long as the data is written to the
correct tables, it doesn't matter if you have 1 form or 100.
 
J

John W. Vinson

Hi there,

Is it possible to have data captured in 2 different forms? Considering the
user only entered the data through 1 form?

Is it possible to see the same view from two different windows?


Data is NOT stored in forms. Forms are just windows, tools to manage data. The
data is stored in tables, and only in tables. You can very easily have
multiple forms viewing the data in one or more tables.


John W. Vinson [MVP]
 
J

John W. Vinson

Hi there,

Is it possible to have data captured in 2 different forms? Considering the
user only entered the data through 1 form?

Firz, I think you need to take a step back and study about the basic
principles of how Access works. Your past few questions suggest that you're
approaching the program incorrectly!

Take a look at some of the references in:

Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

A free tutorial written by Crystal (MS Access MVP):
http://allenbrowne.com/casu-22.html

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials

Crystal's tutorial and the Database Design 101 links on Jeff's page may be
particularly useful.


John W. Vinson [MVP]
 
Top