UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Does Not Refresh The User, Access 2010    
 
   
Sowa222
post Aug 12 2017, 01:54 PM
Post#1



Posts: 29
Joined: 23-March 17



I have a login form frmLogin
He opens it Navigation form. In which is a text box Usertxt.

And depending on the user from this field Hides form tab
But it does not work

I think there is an error here
DoCmd.OpenForm "frmLogin", acNormal, , , , acHidden
DoCmd.OpenForm "Navigation Form"

Forms![Navigation Form]![Usertxt] = txtUserName

please help
Attached File(s)
Attached File  Security_Level_in_Access_1_.zip ( 43.91K )Number of downloads: 2
 
Go to the top of the page
 
moke123
post Aug 12 2017, 04:06 PM
Post#2



Posts: 1,045
Joined: 26-December 12
From: Western Ma., USA


before even addressing your code, I would suggest you delete and recreate the navigation form. I deleted all the code in your form, compacted and repaired it, de-compiled it, and recompiled it. I put a command button with
CODE
DoCmd.Close acForm, Me.Name
in it and it still errors. it may be the form is corrupt. I also tried importing it into new DB and it still errors.
Go to the top of the page
 
Sowa222
post Aug 13 2017, 01:00 AM
Post#3



Posts: 29
Joined: 23-March 17



I've added an improved link
Attached File(s)
Attached File  Security_Level_in_Access.zip ( 296.47K )Number of downloads: 5
 
Go to the top of the page
 
moke123
post Aug 13 2017, 02:06 AM
Post#4



Posts: 1,045
Joined: 26-December 12
From: Western Ma., USA


did you re-create the Nav form? I deleted all your code, all other forms, and deleted all the objects on your nav form. added a command button to close it and it errors. if you use a macro it closes but VBA errors.
Go to the top of the page
 
Sowa222
post Aug 13 2017, 03:10 AM
Post#5



Posts: 29
Joined: 23-March 17



I do not have these problems
Go to the top of the page
 
moke123
post Aug 14 2017, 05:09 AM
Post#6



Posts: 1,045
Joined: 26-December 12
From: Western Ma., USA


well your nav form throws an error for me no matter what i do to it.

one thing to consider however is how you are re-opening your login form with DoCmd.OpenForm "frmLogin", acNormal, , , , acHidden
I'm not sure but it may be that this is refreshing the form and it is losing its values.
I would be more inclined to set its visible property to false although i'm not sure why you would want this form to persist..
Go to the top of the page
 
Sowa222
post Aug 15 2017, 01:32 AM
Post#7



Posts: 29
Joined: 23-March 17



Because I took him to the text field of the login name to the text box on subsequent forms. I do not know how to download the login from the closed form, so I hide it
Go to the top of the page
 
moke123
post Aug 15 2017, 05:35 AM
Post#8



Posts: 1,045
Joined: 26-December 12
From: Western Ma., USA


how about just assigning the value to a tempvar and passing it that way.
Go to the top of the page
 
Sowa222
post Aug 15 2017, 06:13 AM
Post#9



Posts: 29
Joined: 23-March 17



But how to do it to forward it
Go to the top of the page
 
moke123
post Aug 15 2017, 07:30 AM
Post#10



Posts: 1,045
Joined: 26-December 12
From: Western Ma., USA


see tempvars
a tempvar will persist until you remove it or close access and can be used anywhere in your project.
Go to the top of the page
 
Sowa222
post Aug 15 2017, 07:53 AM
Post#11



Posts: 29
Joined: 23-March 17



But how does the tempvar reference code look like?
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    17th August 2017 - 03:07 AM