Results 1 to 4 of 4
  1. #1
    hhuuhn is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2009
    Posts
    14

    Red face Passing identity values from main form to other forms

    Hello,
    I have problem to pass identity value from main form to other forms in Access 03 database. I am sure this is simple for most of you but I am stumped.
    I have one main form BASELINE, and subsquent forms like FOLLOWUP, MEDICATIONS etc that need to carry over patient Id, initials to the subsquent forms. if record not in BASELINE, it not allowed in other forms.


    The patient ID passed successfully, not initials didn't work, when i open the other form , it always showed Compile error Sub or Function not defined with FixMe highlighted
    I have the following code:

    Private Sub Form_Current()
    If Not IsNull(Me.[HiddenPatN]) Then
    Dim per As String
    per = Me.[HiddenPatN].Value
    Me.PN.Value = per
    Dim vv As Variant

    vv = DLookup("[Initials]", "Baseline", "[PTNTNM] = '" & per & "'")
    Me.ini.Caption = FixMe(vv)
    Else
    Me.PN.Value = ""
    Me.ini.Caption = ""
    End If

    End Sub

    Any one could help me to fix the problem.
    Thanks lot!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What is the FixMe() Function? It would have to be a User Defined Function (UDF). A find on the entire project should locate it.

  3. #3
    hhuuhn is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2009
    Posts
    14

    The problem solved

    Thank you very much RuralGuy,
    you are right, I missed this part and made UDF, it works now.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    That's great! Are we ready for the link in my signature yet?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Passing a variable to a form
    By cjamps in forum Forms
    Replies: 0
    Last Post: 03-02-2009, 05:32 AM
  2. Replies: 0
    Last Post: 12-16-2008, 07:49 AM
  3. Passing Values
    By dromorkid in forum Forms
    Replies: 0
    Last Post: 11-25-2008, 05:04 PM
  4. tabular forms - setting values per each record
    By Daytona675 in forum Forms
    Replies: 0
    Last Post: 11-25-2008, 09:43 AM
  5. Table values in forms
    By xzxz in forum Access
    Replies: 3
    Last Post: 10-28-2008, 08:29 AM

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