Compile a Table in a MAIN FORM from SUBFORMS tabs

michi.for

Registered User.
Local time
Yesterday, 16:47
Joined
Jan 13, 2016
Messages
45
Good morning, hi all and ty for your support:

this is my situation:

a "DATAENTRY_FORM" (that put data in "DATAENTRY_TABLE").
Inside that form there is a TAB with 1 SUBFORM (linked to a "SECOND_TABLE").

There is a relation between DATAENTRY_TABLE and SECOND_TABLE.

Through a button, on the subform, i want to put data inside a textbox of the main form (and inside the DATAENTRY_TABLE).

I cant do that, because if i code a CLICK_ON BUTTON EVENT:
Forms!MAIN_FORM!textbox = Me.ValueInsideTheSubform.value

It shows me an error:
CAN'T UPDATE THE RECORDSET.

What is wrong?
 
Last edited:

TY i'll try to check if i am in these case.


Now i am asking if there is a simplest way to reach my scope:

I have a CLIENT DOCUMENT 8Document table) that must contain this data:
Name (Client Table)
Surname (Client Table)
Address 1 (Address Table)
Address 2 (Address Table)
Mail Contact (Contacts Table)
Phone (Contacts Table)
Bank account details (Bank Table)

I made a form to "compile" this document.

In this form i need to "entry" or "choose"(if there is more than one) the data.

I thought about a main form linked to the DOCUMENT TABLE and 3 TAB forms (for address, contacts and bank).

For example:
a client could have 2 mail addresses, so i must choose only one.
I go to the "contacts" tab, and CHOOSE the first one mail.
Here, the DOCUMENT TABLE must contain the ID of the mail i choose...

How can i do it?

This is why i ask about passing a data from a subform to a main form.
 
Why not have a field in the Contact table in which you mark the active one?
Else explain why you want the DOCUMENT TABLE to contain the ID of the E-mail you choose!
 
Hi jhb,
Good question.
i need to collect and store data i choose to put into the document.
Every document has a unique number.
In that way every time I can Edit and reproduce the document.

My idea is to collect the references of my choices in the main table and from that table print out the document.

You made in another way?

TY again, i need to discuss
 
What is the difference between the DATAENTRY_TABLE and the Document table?
Show some sample.
 
Why not have a field in the Contact table in which you mark the active one?
Else explain why you want the DOCUMENT TABLE to contain the ID of the E-mail you choose!

If i have a document table like this:
DOCUMENT NUMBER: automatic number.
NAME: id client in client table.
ADDRESS: id address in address table.
mail: id mail in mail table (because a client could use one of its mail address).

Everytime i want to display and print the "document" (report), i use only the DOCUMENT NUMBER and automatically it produce the document.

So, i use my forms to "choose" the right data to put inside the document.

Did you understood?

TY
 
Could you post your database with some sample data, (zip it)?

The Report must contain these informations:
NAME and SURNAME (from CLIENT_TABLE: ID_client, Name, Surname)
ADDRESS (from ADDRESS_TABLE: ID_address, ID_client, street, city)
IBAN (from BANK_TABLE: ID_bank, ID_client, IBAN)

DOCUMENT_table: ID_document, ID_client, ID_address, ID_bank.

Relations between tables:
from Client to Address and Bank = 1 to many
from Document and Client = 1 to many

I hope is clear.....
It takes me a lot to made a zip example......sorry
 

Users who are viewing this thread

Back
Top Bottom