# Database Discussions > Microsoft Access >  Transfer data from form to another form

## FMKA

Hello guys

i need your help here  i have a form to microsoft access  two forms i mean

one

Identity that contains field   
ID N0
Firs Nme
Last Nme
Birthday
School


Another is a main form   


i Created  a combo box  with ID N0  what i want if i click the ID N0 this one transfer all the information to man form instead of typing one by one
your help please if you have demo just post the link here

----------


## boblarson

> Hello guys
> 
> i need your help here  i have a form to microsoft access  two forms i mean
> 
> one
> 
> Identity that contains field   
> ID N0
> Firs Nme
> ...


Actually, you would not store anything EXCEPT the ID Number in the second table.  The rest will stay in the other table (due to rules of normalization) and you can use a query to get those details when necessary.

To DISPLAY the details on the second form, you could do like I do in this sample from my website.

----------


## FMKA

> Actually, you would not store anything EXCEPT the ID Number in the second table.  The rest will stay in the other table (due to rules of normalization) and you can use a query to get those details when necessary.
> 
> To DISPLAY the details on the second form, you could do like I do in this sample from my website.


Thank you brother   i saw your sample and  downloaded it. in event procedure  I saw the codes as you placed  i think this time it will work  

Thanks

----------


## FMKA

> Actually, you would not store anything EXCEPT the ID Number in the second table.  The rest will stay in the other table (due to rules of normalization) and you can use a query to get those details when necessary.
> 
> To DISPLAY the details on the second form, you could do like I do in this sample from my website.



Bob,

what i can do  if  the combo is in main form and bound txt box is in subform   your help will be apreciate

----------


## boblarson

If you have the data in the combo (let's say you have the third field in the combo and want to put it in the subform), the subform's text box control source would be:

=[Forms]![YourParentFormNameHere]![YourComboNameHere].[Column](2)

----------


## FMKA

> If you have the data in the combo (let's say you have the third field in the combo and want to put it in the subform), the subform's text box control source would be:
> 
> =[Forms]![YourParentFormNameHere]![YourComboNameHere].[Column](2)


Bob
 how can i do it in Visual Basic

----------


## FMKA

> If you have the data in the combo (let's say you have the third field in the combo and want to put it in the subform), the subform's text box control source would be:
> 
> =[Forms]![YourParentFormNameHere]![YourComboNameHere].[Column](2)


i miss the point in my previous email  what i mean is,  if the Combo box is in main form and the fields text are in Subform

following your sample  can I use  the same comand in visual Basic or I need to include the subform name ?

----------


## boblarson

> i miss the point in my previous email  what i mean is,  if the Combo box is in main form and the fields text are in Subform
> 
> following your sample  can I use  the same comand in visual Basic or I need to include the subform name ?


1. I just gave you the syntax for referring to the main form item from the subform control.

2. You do not want to store that information as it is redundant and violates normalization rules, hence that is why I gave you the syntax I did which will DISPLAY the value from the main form but not store it in the subform.

----------


## FMKA

> 1. I just gave you the syntax for referring to the main form item from the subform control.
> 
> 2. You do not want to store that information as it is redundant and violates normalization rules, hence that is why I gave you the syntax I did which will DISPLAY the value from the main form but not store it in the subform.


Thanks a lot  Bob

one more thing how can disable a Text box after Updating so that people cannot go there in and change data everytime they want  i want to do that to avoid information Falsification

your help

----------


## boblarson

> Thanks a lot  Bob
> 
> one more thing how can disable a Text box after Updating so that people cannot go there in and change data everytime they want  i want to do that to avoid information Falsification
> 
> your help


In the form's On Current event you can put:


```
Me.AllowEdits = Me.NewRecord
```

And, if you don't want deletions, change the form's AllowDeletions to NO in the form properties.

----------


## FMKA

> In the form's On Current event you can put:
> 
> 
> ```
> Me.AllowEdits = Me.NewRecord
> ```
> 
> And, if you don't want deletions, change the form's AllowDeletions to NO in the form properties.



Hi Bob

i have a question;   in my calculation i do not want negative value for instance
5-12=  -7      what kind  of code can i use for   not allowing negative value 
appreciate your help

----------

