Advertisement

04.27.2007 at 06:44AM PDT, ID: 22538342
[x]
Attachment Details

access form name question

Asked by jmcdonald69124 in Microsoft Access Database, Microsoft Programming

Tags: access, form, name

rEALLY qUICK qUESTION - 500 POINTS by 10:15AM

I have the following code, i can see the form name when i put in break points and it is correct, i can run the sub with a hand coded value that is teh same as form name in the following ![FormName]! below but for some reason it will not take the formName that is passed in the var FormName??? How can i get this to work?

Public Sub StartMeUp(FormName As String)

strUserName = Environ("username")

' Select organization from the database based on the Windows UserName
Dim db As DAO.Database, qdf As DAO.QueryDef, rs As DAO.Recordset
Dim sSQL As String
Dim strOrganization As String
Set db = CurrentDb

sSQL = "SELECT MAIN_Users.Organization FROM MAIN_Users WHERE (((MAIN_Users.WindowsUserName)='" & strUserName & "'));"
Set rs = CurrentDb.OpenRecordset(sSQL)
If rs.EOF Then Exit Sub

userOrg = rs!Organization & "1"

stCatLinkCriteria = "Category = '" & userOrg & "'"
   
' Now reset the pivture based on the user login.

headerImg = CurrentProject.Path & "\Images\header_" & userOrg & ".jpg"

Forms![FormName]![imgHeader].Picture = headerImg

End SubStart Free Trial
[+][-]04.27.2007 at 06:45AM PDT, ID: 18988885

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.27.2007 at 06:46AM PDT, ID: 18988894

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Access Database, Microsoft Programming
Tags: access, form, name
Sign Up Now!
Solution Provided By: rockiroads
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.27.2007 at 06:47AM PDT, ID: 18988899

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.27.2007 at 06:48AM PDT, ID: 18988906

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.27.2007 at 06:50AM PDT, ID: 18988919

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.27.2007 at 06:50AM PDT, ID: 18988926

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.27.2007 at 07:03AM PDT, ID: 18989042

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.27.2007 at 01:01PM PDT, ID: 18991827

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32