Hi I have this code behind a cmd button in a form:
Private Sub Label120_Click()
If InputBox("Please enter your password", "Authorization needed") = "leisure2" Then
DoCmd.RunMacro "Edit"
Else
DoCmd.RunMacro "Macro3"
Exit Sub
End If
End Sub
I want that the password, when the user enters it...
Thank you very much for your help...I appreciate it very ver much but oyu see dear friend I'm not a programmer I'm just a summerworker at a company and I therefor don't know how to program just a little bit, so don't take this the wrong way but I didn''t understand anything, I'm so stupid I know...
it seems like it only works as long as you use the code on one field?....but the other two fields aren't working at all
[This message has been edited by OliviaS (edited 08-10-2001).]
And one thing I have three fields but when I put doc_mans code in the other fields which by the way both are textfields I get a runtime error saying: " Run time error '3075'
Syntax error(missing operator)in query expression '[Productno]like"* AND[Denomination]like"*00*" AND[Supplier]like"*'
I...
hey guys I have one more thing that nobody has answered to and that is that I wish to add one searchfield to the form, could you say what to do just by looking at the code?........This is my last question promise =)
No, wait doc_mans code is working!!!!, but I forgot that my numbers(textfield productno) looks like this 400 62 00-00(space inbetween the digits) and if I type 62(I have to wright space then 62 and all the numbers containing "space 62" will come up). But I'm so glad that it finally works, Man y...
Here you go ´Ken
Private Sub btnRunQuery_Click()
On Error GoTo Err_btnRunQuery_Click
Dim MyDatabase As Database
Dim MyQueryDef As QueryDef
Dim where As Variant
Set MyDatabase = CurrentDb()
On Error Resume Next
' Delete the existing dynamic query; trap the error if...
Hey guys I was wondering I have a search code and one string that says.
where = where & " AND [Productno] Like '" + Me![Productno] + "*" + "'"
How can I change this so that whatever the user inputs will be machted to any part of the field Productno, as it is now it just serches in the beginning...
I found this code really works great!
Private Sub Command75_Click()
If InputBox("Please enter your password", "Authorization needed") = "leisure2" Then
DoCmd.RunMacro "Add"
Else
DoCmd.RunMacro "Macro3"
Exit Sub
End If
End Sub
Hi I need to passwordprotect two cmd buttons in a form, how do i go about? Like a message box poping up saying insert password if you press the button and then you can (in my case) edit the tables...Very grateful for any suggestions
Option Compare Database
Private Sub btnRunQuery_Click()
On Error GoTo Err_btnRunQuery_Click
Dim MyDatabase As Database
Dim MyQueryDef As QueryDef
Dim where As Variant
Set MyDatabase = CurrentDb()
On Error Resume Next
' Delete the existing dynamic query; trap the...