Results 1 to 11 of 11

Thread: Transfer data from form to another form

  1. #1
    Join Date
    Aug 2009
    Posts
    50

    Transfer data from form to another form

    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

  2. #2
    Join Date
    Jan 2009
    Location
    Portland, Oregon
    Posts
    21
    Quote Originally Posted by FMKA View Post
    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
    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 Larson
    Former Access MVP
    2008-2010

  3. #3
    Join Date
    Aug 2009
    Posts
    50
    Quote Originally Posted by boblarson View Post
    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

  4. #4
    Join Date
    Aug 2009
    Posts
    50
    Quote Originally Posted by boblarson View Post
    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

  5. #5
    Join Date
    Jan 2009
    Location
    Portland, Oregon
    Posts
    21
    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 Larson
    Former Access MVP
    2008-2010

  6. #6
    Join Date
    Aug 2009
    Posts
    50
    Quote Originally Posted by boblarson View Post
    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

  7. #7
    Join Date
    Aug 2009
    Posts
    50
    Quote Originally Posted by boblarson View Post
    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 ?

  8. #8
    Join Date
    Jan 2009
    Location
    Portland, Oregon
    Posts
    21
    Quote Originally Posted by FMKA View Post
    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.
    Bob Larson
    Former Access MVP
    2008-2010

  9. #9
    Join Date
    Aug 2009
    Posts
    50
    Quote Originally Posted by boblarson View Post
    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

  10. #10
    Join Date
    Jan 2009
    Location
    Portland, Oregon
    Posts
    21
    Quote Originally Posted by FMKA View Post
    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:
    Code:
    Me.AllowEdits = Me.NewRecord
    And, if you don't want deletions, change the form's AllowDeletions to NO in the form properties.
    Bob Larson
    Former Access MVP
    2008-2010

  11. #11
    Join Date
    Aug 2009
    Posts
    50
    Quote Originally Posted by boblarson View Post
    In the form's On Current event you can put:
    Code:
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •