Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    hithere is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    63

    Linking Info/Passing Paramaters?


    I have two tables structured as:
    • Personal Information (includes first name, last name, pesonal ID, and DOB fields)
    • Referral Information which includes first name, last name and personal ID fields (looked up from the Personal Info table) in addition to a from field, to field, and date field
    I have two different forms for each of these tables and would like to add two buttons to the Personal Information form that link to the Referral Information form. Once the info is filled out in the personal info form I would like it to open that person's existing record in the Referral Information form for editing in button #1 or allow for the creation of a new record for Referral Information in button #2. I am fairly new at access so I'm not sure how to accomplish this. I have inquired about this and someone told me that it is passing paramaters but I'm not sure what that is.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    To start, the Personal Information should *not* be in both tables. All that is needed in the Referral table is one field containing the PrimaryKey field from the correct record in the Personal Info table.

  3. #3
    hithere is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    63
    Actually the Patient Info Form is based off of the table and the Referral Info form is based off a query that combines info from the patient info table and referral info table by the patient id number. How can I program the button on the patient information to automatically jump to only that patient's specific referral information on the referral info form.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Maybe some of Paul's examples will be useful for you. http://www.baldyweb.com/

  5. #5
    hithere is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    63
    I tried following the example but I keep getting a complie error stating method or data member not found. Is there a reason why this is happening or can you show me how to write the code. I simulated the code but it didn't work.


    The name of the first form I have is flkp_Verify_PtExits_LastName and I want to pass three fields txtMRN, txtLast, and txtFirst to the form frm_New_Rfrl_View. All the fields exist in both forms.

  6. #6
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Why not use a subform which contains the referral info? Then you only need one form.

  7. #7
    hithere is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    63
    The way I would like the database to work is to have a verification that prohibits the user from...say entering an order without first having the customer first. Make sense? In the system I currently use the are far too many inaccurate records for individuals that do not even exisit. This will serve as a good tool to field through records quickly and be a check and balance.

  8. #8
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Can you show us your table layouts? It seems there may be an issue with your tables.
    Until we see what you're working with, we can only guess-- and that's not great advice.

  9. #9
    hithere is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    63
    Attached is a copy of the database I am woking on.

  10. #10
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Whats the difference between agency and facility?
    You should relate the tables based on keys, not name.
    You should avoid lookups at the table level.
    see http://access.mvps.org/access/lookupfields.htm

  11. #11
    hithere is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    63
    There is no difference between agency and facility. I'll change that naming convention. I'll also change the relationships to ID's. Though, I'm not sure how to lookup values other than at the table leve.

  12. #12
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

  13. #13
    hithere is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    63
    Good deal! Thanks. Will this help solve my problem with passing the paramaters too?

  14. #14
    hithere is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    63
    I made the suggested changes to the tables and forms but now I am getting lost passing the paramaters?

  15. #15
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Can you be a little more specific than "lost"?

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 03-04-2011, 10:28 AM
  2. Replies: 3
    Last Post: 01-31-2011, 11:47 AM
  3. AutoNumber Info
    By anoob in forum Access
    Replies: 3
    Last Post: 01-12-2011, 05:35 PM
  4. Passing specific Combobox info to a query
    By pwdpwd in forum Queries
    Replies: 1
    Last Post: 02-09-2010, 12:53 PM
  5. SQL- retrieving info
    By jmarti57 in forum Programming
    Replies: 0
    Last Post: 12-10-2008, 03:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums