Microsoft Access Forums

Go Back   Microsoft Access Forums > Access Forums > Programming

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 05-29-2009, 06:47 AM
hhuuhn hhuuhn is offline Windows XP Access 2003 (version 11.0)
Novice
 
Join Date: Mar 2009
Posts: 14
hhuuhn is on a distinguished road
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!
Reply With Quote
  #2  
Old 05-29-2009, 12:53 PM
RuralGuy's Avatar
RuralGuy RuralGuy is online now Windows 7 Access 2007 (version 12.0)
Administrator
 
Join Date: Mar 2007
Location: 8300' in the Colorado Rocky Mountains
Posts: 4,264
RuralGuy will become famous soon enoughRuralGuy will become famous soon enough
Default

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"
Reply With Quote
  #3  
Old 06-02-2009, 07:36 AM
hhuuhn hhuuhn is offline Windows XP Access 2003 (version 11.0)
Novice
 
Join Date: Mar 2009
Posts: 14
hhuuhn is on a distinguished road
Default The problem solved

Thank you very much RuralGuy,
you are right, I missed this part and made UDF, it works now.
Reply With Quote
  #4  
Old 06-02-2009, 07:51 AM
RuralGuy's Avatar
RuralGuy RuralGuy is online now Windows 7 Access 2007 (version 12.0)
Administrator
 
Join Date: Mar 2007
Location: 8300' in the Colorado Rocky Mountains
Posts: 4,264
RuralGuy will become famous soon enoughRuralGuy will become famous soon enough
Default

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"
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -8. The time now is 02:57 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.