thinker388
asked on
Changing tag property
how can i change the tag property at a click of a button? im password protecting the form thru the tag property..now ive setup another form to change the passwrod(tag)..my code in that other form is:
On Error GoTo Err_Command9_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAdmin"
DoCmd.OpenForm stDocName, , , stLinkCriteria
[Forms]![frmadmin].Tag = txtNewPass
after i click the button, i dont get any error msg and the tag property doesnt change either..whats going wrong?
On Error GoTo Err_Command9_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAdmin"
DoCmd.OpenForm stDocName, , , stLinkCriteria
[Forms]![frmadmin].Tag = txtNewPass
after i click the button, i dont get any error msg and the tag property doesnt change either..whats going wrong?
did u try changing the tag property before u open the form?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
na, u cant unless u first open it in design mode
the alternative is to create a public procedure in that form, then call that passing in the password, and called code does the rest or have a hidden textbox
the alternative is to create a public procedure in that form, then call that passing in the password, and called code does the rest or have a hidden textbox
ASKER
i did this:
If txtNewPass = txtCNewPass Then
[Forms]![frmadmin].Tag = txtNewPass
On Error GoTo Err_Command9_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAdmin"
DoCmd.OpenForm stDocName, , , stLinkCriteria
still doesnt work
If txtNewPass = txtCNewPass Then
[Forms]![frmadmin].Tag = txtNewPass
On Error GoTo Err_Command9_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAdmin"
DoCmd.OpenForm stDocName, , , stLinkCriteria
still doesnt work
It worked for me
Note
[Forms]![frmadmin].form.Ta g = txtNewPass
NOT
[Forms]![frmadmin].Tag = txtNewPass
[Forms]![frmadmin].form.Ta
NOT
[Forms]![frmadmin].Tag = txtNewPass
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dont think you can at run time permenatly change the tag property of a form that is what you are trying to do yes?
I would create a hidden table and store the password in that. I usually use a table called tblpref and store the password in that. I use 2 field key and string I set the key to password and the string to the password. then I do a dlookup to test if the password is correct and use an rs or a query to change it.
HTH
Jag5x5
I would create a hidden table and store the password in that. I usually use a table called tblpref and store the password in that. I use 2 field key and string I set the key to password and the string to the password. then I do a dlookup to test if the password is correct and use an rs or a query to change it.
HTH
Jag5x5
ASKER
knollbert...that didnt work...
rockiroads...can u expand a bit upon the alternative?
create a public procedure in which form? the one with the txtnewpass or the one whose tag property i wanna change..
and where should i call it? and should it have the exact code as in my existing clicck procedure?
and how can i use the hidden textbox?
Thanks...
rockiroads...can u expand a bit upon the alternative?
create a public procedure in which form? the one with the txtnewpass or the one whose tag property i wanna change..
and where should i call it? and should it have the exact code as in my existing clicck procedure?
and how can i use the hidden textbox?
Thanks...
ASKER
knoll...ive tried both ways..no luck
walter..im sure...cuz i have two fields..passwd and conf passwd..n i only let the procedure run if they r equal...ive tried typing in diff values for the two passwd boxes..and it didnt run as planned...
jag..yes thats what im trying to do
walter..im sure...cuz i have two fields..passwd and conf passwd..n i only let the procedure run if they r equal...ive tried typing in diff values for the two passwd boxes..and it didnt run as planned...
jag..yes thats what im trying to do
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok i just talked with the person for whom I'm doing this project for, and he said that he's just going to change the tag by going to design view himself. :)
Thanks a lot for the replies...I'll split up the points.
Thanks a lot for the replies...I'll split up the points.