![]() |
|
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
What is the FixMe() Function? It would have to be a User Defined Function (UDF). A find on the entire project should locate it.
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07 If your issue is resolved...follow this link for directions on how to use the Solved thread tool! Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus" |
|
#3
|
|||
|
|||
|
Thank you very much RuralGuy,
you are right, I missed this part and made UDF, it works now.
|
|
#4
|
||||
|
||||
|
That's great! Are we ready for the link in my signature yet?
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07 If your issue is resolved...follow this link for directions on how to use the Solved thread tool! Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus" |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing a variable to a form | cjamps | Forms | 0 | 03-02-2009 02:32 AM |
| Is it possible to have more than 1 main form when using subforms? | RubberStamp | Forms | 0 | 12-16-2008 04:49 AM |
| Passing Values | dromorkid | Forms | 0 | 11-25-2008 02:04 PM |
| tabular forms - setting values per each record | Daytona675 | Forms | 0 | 11-25-2008 06:43 AM |
| Table values in forms | xzxz | Access | 3 | 10-28-2008 06:29 AM |