Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2004
    Location
    Fort Worth, TX
    Posts
    43

    Unanswered: Need to populate data in a linked form

    I have a dbase in Access 07 that I am trying to fix. I have 2 problems

    1. dbase stucture= table FILES links to COMMENTS by FileNumber (one to many) COMMENTS has Primary Key COMMENT#(autonumber)

    I have a form that has FILES info and a linked form for COMMENTS.
    I want to click on button to open a new comment from FILE form and have the FileNumber populated from the FILE form into the COMMENTS form

    How can I get that info to automatically populate?


    2. (Not part of the main subject)

    FILES form has multiple tab pages and I am able to tab thru them using "KeyCode = 9 Setfocus VBA. Is there a way to get it to go backwards (as in how do I program it for the Shift/Tab function between tabs)?

    Thanks

  2. #2
    Join Date
    May 2010
    Posts
    601
    Quote Originally Posted by DangersDan View Post
    I have a dbase in Access 07 that I am trying to fix. I have 2 problems

    1. dbase stucture= table FILES links to COMMENTS by FileNumber (one to many) COMMENTS has Primary Key COMMENT#(autonumber)

    I have a form that has FILES info and a linked form for COMMENTS.
    I want to click on button to open a new comment from FILE form and have the FileNumber populated from the FILE form into the COMMENTS form

    How can I get that info to automatically populate?

    Are you really linked to a dBase (.dbf) file (click here)?


    Is there some reason you are not using a sub form, It will make this a whole lot easier. No VBA code required.

    If you must use a separate (pop-up) form, you have to options:

    1) Push the value in the OpenArgs. Use the Newly opened form's On Current event or On Load event, if unbound, event to set the value.

    2) Pull the value using a form reference back to the original form

    Quote Originally Posted by DangersDan View Post
    2. (Not part of the main subject)

    FILES form has multiple tab pages and I am able to tab thru them using "KeyCode = 9 Setfocus VBA. Is there a way to get it to go backwards (as in how do I program it for the Shift/Tab function between tabs)?
    You must do a separate test to see if the Shift key is also pressed.


    See:
    KeyDown Event [Access 2003 VBA Language Reference]
    Last edited by HiTechCoach; 07-28-10 at 14:21.
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  3. #3
    Join Date
    Dec 2004
    Location
    Fort Worth, TX
    Posts
    43
    I am wanting the separate form for reasons of the comment field being treated as a pop up

    "If you must use a separate (poo-up) form, you have to options:

    1) Push the value in the OpenArgs. Use the Newly opened form's On Current event or On Load event, if unbound, event to set the value.

    2) Pull the vale using a form reference back to the original form"


    How do I do this? I have an embedded macro built by the wizard.

  4. #4
    Join Date
    May 2010
    Posts
    601
    I am not sure how to do it with a embedded Macro. I still use VBA code in an event procedure so that it will be backwardly compatible with 2003 and prior versions.

    I have been experimenting with Embedded Macros with 20007/2010 lately.

    From what I have learned, you can use the a TempVar to pass values between forms without using VBA code.

    I will see if I can create an example for you.
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  5. #5
    Join Date
    Dec 2004
    Location
    Fort Worth, TX
    Posts
    43
    I found an easy fix for the open form
    I am running an append table query that creates a new record from the open form filter and opening the linked pop up filtered to the information I need. I is a workaround but it does the trick.

  6. #6
    Join Date
    May 2010
    Posts
    601
    Glad to hear you found a solution.

    Just out of curiosity, I am going to figure out how to do it with an embedded macro.

    I will post an example if you are interested.
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  7. #7
    Join Date
    Dec 2004
    Location
    Fort Worth, TX
    Posts
    43
    Yeah, that would be a great thing to have in case I run into another issue.
    Thanks

Tags for this Thread

Posting Permissions

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