Opening Autoexec Macro Causes Reference To Outdated Login Form

Feb 20, 2014

I changed the name of a form referenced in the Autoexec macro from "frmLogin" to "frmLoginPW". However when I Open Access 2010 instead of Form "frmLoginPw" opening I get a message box saying that the system can't find "frmLogin". If I do a search through all the code in the project there is NO reference to "frmLogin" as I changed any code to refer to "frmLoginPW" and recompiled the project.

I can not get rid of this error and if I press the OK button on this error message ( from MS Access not my error coding) the "frmLoginPw" opens and the code in the form works. (Password authentication etc etc.). I deleted the AutoExec macro and remade the macro and referred it to the new form "frmLoginPW", this did not work. I loaded the Accdb file using the Run command and the /Decompile command line parameter to no effect.

View Replies


ADVERTISEMENT

Shift Key Not Disabling AutoExec Macro

Feb 19, 2014

I have a DB with an AutoExec macro. I created the DB from scratch. When I open the DB from Windows Explorer with the shift key held down the AutoExec macro still runs. If I have people on other computers open the same way it doesn't run. If I open Access first then hold the shift key down it doesn't run. I couldn't find any references to a shift key issue like this. I'm looking for an answer as to why there would be a difference on my PC between opening in WE or directly in Access.

View 3 Replies View Related

Forms :: Login Form On Opening Access Asking For Password And Login Name

Jun 17, 2013

I have access 2010, I currently have a database in place and operational. What I am wondering is there a way to have a form come up whenever someone opens access and asks for a password and login name. Also I would like to have a 2 tier system. One for Admins and the other for users with limited access.

Is this even possible to accomplish?

View 2 Replies View Related

Forms :: Multi-User Login Form With Macro

Nov 4, 2013

I've managed to create a multi-user login form with macro.

user1 is able to login with his password and user2 is able to login with his password. latter I noticed that user1 is able to login with any password in the table and use his previous password to login even after changing it.

View 14 Replies View Related

Forms :: User Login Form On Opening Of Database

Feb 17, 2015

I need to know the procedure or event code for user login form at opening.

I am working on database which is almost done and i defined tables for users with passwords.

I need to know how i can assign Login Form to be appear on opening of database no other person than listed users should be able to enter or open database without password, to enforce this i made a login form.

View 5 Replies View Related

Macro Or VBA For Opening A Form In Particular Record

Jan 30, 2013

Self tought in Access07 but I'm trying to do the following:

I've got a form (Clients_F) that has a subform in datasheet view with a list of quote numbers made by each customer, I have managed to make a Macro after a few hours and googling, that opens another form (Quotes_F) so that it can be edited when a quote number is clicked, but I wish to be able to open Quotes_F as a new record when the empty field under the numbers column in the list is clicked.

Also want to know if it's possible to mantain the Customer's details pre-filled?...I am guessing that this is done through the CustomerID(PK & FK)?

View 9 Replies View Related

Forms :: Opening Bound Form Via Macro Or Docmd?

May 26, 2015

I have a bound form that normally is opened via macro. Very straight forward just has the following in the where.

Code:
[userID]=[Forms]![Home]![txtSelectUser]

I'm trying to open the same form via doCmd.

Code:
DoCmd.OpenForm "frmUserInformation", , , "UserID=" & Me.txtProblemID

I've msgbox'd the txtProblemID and the correct ID is being passed. Where I fall into an error is on the frmUserInformation's onLoad event which uses the ID form the frmUserInformation.txtUserID box. The error I get is "Syntax error (missing operator in query expression '[fldUserID]='."

Code:
strEndMonth = DLookup("fldDateExpiration", "qryUserExpirationDate", "[fldUserID]=" & Me.txtUserID)

What I've narrowed it to is the timing between the docmd.openform and the onload of the form. I've tried changing the onload to be on activate - and it just opens empty.

how to get the docmd to open the form correctly before the onload tries to fire?

View 6 Replies View Related

Macro To Fetch Recordset Corresponding To Reference Value From Table

Mar 3, 2014

I reused one macro to develop a form in MS access.

The macro fetch the record set corresponding to the reference value from the table.

The reformat value is a numeric field.

The macro code is :

Private Sub Modifiable20_AfterUpdate()
Dim rs As Object
Set rs =Me.Recordset.Clone
rs.FindFirst "[Reference_Number] = ' " & Me![Modifiable20] & " ' "
If Not rs.EOF then Me.Bookmark = rs.Bookmark
End Sub

What to change in the above code to make it work....

View 3 Replies View Related

Login SQL Server Linked Tables Automatic On Event Load Of Login Form

Apr 17, 2015

I have a ms access application in Front End and linked tables to sql server 2008 r2 in back end.. every time I open my application the linked tables ask to me for the user and password of the sql server user of the odbc conection. I want to connect to my sql database without login every time the user open the application, I know that can be possible if I start session from vba code...

View 2 Replies View Related

Opening A File With A Macro

Sep 8, 2005

Is it possible to open an Excel FILE using a macro, if so could someone shed some light on this? I know how to open Excel itself using RunApp but it doesnt work with files.

Any help would be appreciated
Cheers all

Bikeboardsurf

View 1 Replies View Related

Opening A Report Using A Macro?

Jan 18, 2013

I have a form in Datasheet view and when you click on a record in that form I want it to take you to a report with all the details of that record number. I have the On Click event set to run a Macro. The Macro is as follows:

OpenReport
Report Name Incident Report
View Report
Filter Name Open
Where Condition =[Event ID]=[Reports]!Incident Report]![Event ID]
Window Mode Normal

This Where Condition works for me open another form from the form with the same Event ID. Why does it come to a "new" Incident on the report?

View 1 Replies View Related

Macro Security Warning When Opening Database

May 15, 2006

Hi everyone,

I was wondering if anybody knew a way to disable the security warning in Access that pops up saying "This file may not be safe if it contains code that was intended to harm your computer. Do you want to open this file or cancel the operation?"

If possible, I'd like to disable the message for just my database, but we currently don't use any other database anyway, so I'm not too concerned with turning it off completely if that's all I can do. I'm sure there has to be an option somewhere to not check for macros or something, but I can't find it.

If anyone knows how to do this or if you know that it is not possible, please let me know.

Thanks,
Sean

View 4 Replies View Related

Removing Outdated Records.

Sep 27, 2006

I have:

Database A with fax numbers:
Example:
- 1. John. W
- 2. Mark. Y
- 3. Sean .S

I exported to a dbf file to do some mass faxing and realised that Mark's fax number is no long in use. (error report by the fax software)

I can export the error report and save as dbf.

Is there a way to make use of this dbf to update and remove Mark's record from Database A?

View 1 Replies View Related

Removing Outdated Records.

Sep 27, 2006

I have:

Database A with fax numbers:
Example:
- 1. John. W
- 2. Mark. Y
- 3. Sean .S

I exported to a dbf file to do some mass faxing and realised that Mark's fax number is no long in use. (error report by the fax software)

I can export the error report and save as dbf.

Is there a way to make use of this dbf to update and remove Mark's record from Database A?

View 1 Replies View Related

Running AUTOEXEC After Holding Down Shift Key - Function Runs Multiple Times?

Aug 19, 2013

I bring up the database (Access 2003 / XP) by holding down the shift-key. As designed, the shift-key by-passes running the autoexec macro automatically. I then run the autoexec macro with the vba code viewer up so I can F8 down through all the code. The autoexec macro is one statement - RUNCODE which executes a vba FUNCTION Startup(). Everything seems to work great, but when the function goes to EXIT FUNCTION I assumed it's completed. BUT the next F8 GOES TO THE Startup() FUNCTION again and runs through the code over and over.

I don't think it does this when the program actually runs normally (don't by-pass the autoexec), but why it's running the function over and over again when I'm F8'ing through the code.

Is it something peculiar with the AUTOEXEC in MS ACCESS? Can I trust that it really does ONLY RUN ONE TIME?

View 2 Replies View Related

Forms :: Closing Opening Form With Timer Then Opening Main Menu

Apr 7, 2014

I have a Form opening from Access Options. I would like to close this Form using the Timer. The following is the code I have used but it is not working.

Private Sub Cover_Page_Form_Load()
OpenTimer = Timer
End Sub
Private Sub Cover_Page_Form_Timer()
If (Timer - OpenTime) = 5 Then DoCmd.Close acForm, "Cover_Page_Form", acSaveYes
End Sub

Next question. If I can get this to work can I then use a DoCmd to open new Form within the code above or do I need a new process.

View 5 Replies View Related

Login Form

Aug 7, 2006

Dear all,
I have an application includes one table "info" and two forms "frmlogin" & "frmwelcome".
The table "info" contains many columns, two of them are [UserName] and [PassWord]. This table is filled with three records. "frmlogin" form contains two text boxes and one button. I want the user to enter user name and the password in those two text boxes, and when clicking the button, I want the application if that user is registered or no. If yes, he/she will be moved to the "frmwelcom", that display "Welcome [UserName]".

I did it, but I don't know where my error is.

See the attached file.

Sorry for bothering you.

Thanks & Regards

Mark K.

View 2 Replies View Related

Login Form Problem

Nov 24, 2005

Hi all

I need help with my Video rental store project the problem is that I want a security login method works with the my requirements. The manager has his own form with all the information he need and the other employees has another form.

I used this tutorial http://www.databasedev.co.uk/login.html to make the login form

the employee tables has ID, Password, Access Level

The VB code is like this

Option Compare Database
Private intLogonAttempts As Integer
Private Sub Form_Open(Cancel As Integer)
'On open set focus to combo box
Me.cboEmployeeLogOn.SetFocus
End Sub

Private Sub cboEmployeeLogOn_AfterUpdate()
'After selecting user name set focus to password field
Me.txtPassword.SetFocus
End Sub

Private Sub btnLogin_Click()

'Check to see if data is entered into the UserName combo box

If IsNull(Me.cboEmployeeLogOn) Or Me.cboEmployeeLogOn = "" Then
MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
Me.cboEmployeeLogOn.SetFocus
Exit Sub
End If

'Check to see if data is entered into the password box

If IsNull(Me.txtPassword) Or Me.txtPassword = "" Then
MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
Me.txtPassword.SetFocus
Exit Sub
End If

'Check value of password in tblEmployees to see if this
'matches value chosen in combo box

If Me.txtPassword.Value = DLookup("EmployeePassword", "tblEmployee", "[EmployeeID]=" & Me.cboEmployeeLogOn.Value) Then

lngMyEmpID = Me.cboEmployeeLogOn.Value

'Close logon form and open splash screen

DoCmd.Close acForm, "frmLogon", acSaveNo
DoCmd.OpenForm "frmMainMenu"

Else



MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid Entry!"
Me.txtPassword.SetFocus
End If

'If User Enters incorrect password 3 times database will shutdown

intLogonAttempts = intLogonAttempts + 1
If intLogonAttempts > 3 Then
MsgBox "You do not have access to this database.Please contact admin.", vbCritical, "Restricted Access!"
Application.Quit
End If

End Sub

I am asking for two things. First I want the Manger go to his form after the login completed and all the other employees go to another form I specify.

Second if there is a way that I show the name of the Employee in the destination form by knowing his ID (passing the ID to the other form).

That’s all if any one can help please

View 2 Replies View Related

Login Form To Set Permissions?

Apr 20, 2005

I have built a login form which shows or hides all tool bars depending on the
user name and password. Can I also control the other permissons like being
able to edit forms and tables? I know I can do this using the MS Access
built in functionality, but can I do it programatically from my user login
screen.

I set the tool bar visibility, close the login form and open the main
switchboard using the "on click" button of my login form. Can the above
permissions controls be done here as well?

Thanks in advance.

Peter

View 1 Replies View Related

User's Form Or Login????

Jul 17, 2005

hey,
can ne1 tell me how to create a User Login form in Access??? i want disply this form 1st, when i open the bd???? i am very new to Access. :)

thanks :) :)

View 3 Replies View Related

Login Form Problem

Mar 15, 2006

I'm currently having issues with my login script on my opening form... it's supposed to close the application if it gets 3 failed attempts, but it's not closing... it just keeps giving me a popup and letting me type the password again. Here's the Code:

'Check to see if data is entered into the UserName combo box

If IsNull(Me.cboEmployee) Or Me.cboEmployee = "" Then
MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
Me.cboEmployee.SetFocus
Exit Sub
End If

'Check to see if data is entered into the password box

If IsNull(Me.txtPassword) Or Me.txtPassword = "" Then
MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
Me.txtPassword.SetFocus
Exit Sub
End If

'Check value of password in tblEmployees to see if this
'matches value chosen in combo box

If Me.txtPassword.Value = DLookup("Password", "tblLogin", "[UserID]=" & Me.cboEmployee.Value) Then

lngMyEmpID = Me.cboEmployee.Value

'Close logon form and open splash screen

DoCmd.Close acForm, "frmLogin", acSaveNo
DoCmd.OpenForm "frmMainMenu"

Else
MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid Entry!"
Me.txtPassword.SetFocus
End If

'If User Enters incorrect password 3 times database will shutdown

intLogonAttempts = intLogonAttempts + 1
If intLogonAttempts > 3 Then
MsgBox "You do not have access to this database. Please contact admin.", vbCritical, "Restricted Access!"
Application.Quit
End If

View 6 Replies View Related

Login Form VbkeyEnter?

Jun 28, 2006

I have a login form which works fine, but I would like it so that when the caret is in the password field that if the user presses Enter it will do the loginBtn_Click event.
This is what I've tried so far...

Private Sub txtPassword_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbkeyEnter Then
kecode = 0
loginBtn_Click
End If
End Sub

Any ideas or suggestions would be awesome.

View 5 Replies View Related

How To Create Login Form

Feb 16, 2013

how can I create login form that it opens on main form and if login successfully it closes and shows main form and if login unsuccessfully alert.

View 5 Replies View Related

Modules & VBA :: Write A More Complex Macro That Will Start Another Macro At Preset Time

Dec 8, 2013

I am trying to write a more complex macro that will start another macro at a preset time, however I am getting stopped at the first hurdle - getting a macro to run another macro.

Here is the code i am using at the moment, all I want to do currently is click the first button, then get the second macro to execute. But no luck, getting error 2157 "cannot find the procedure"

Code:
Private Sub Command3_Click()
MsgBox "1st macro running", vbExclamation, "Note"
Application.Run "teststart1"
' Application.OnTime TimeValue("19:55:00"), "teststart1"

[code]....

View 1 Replies View Related

Login Form Which Restrict The Access

Feb 20, 2005

hi

i am having a login form.
where i have only two users..may be 3
suppose it is admin and guest
then i have a main form where i have 5 tabs,...where each tab contains 7 or more command buttons which will open some forms
what i need is when the admin is login he should be able to edit add delete
but if it is a guest then all the forms should be read only
i know abt the allowaddition and etc..but i don't know where to use it..
is it in the login form or in the main form or in each and every form

regards
jenson

View 1 Replies View Related

Simple Login Form With Database

Oct 5, 2005

Im not that expert in access programming, still have some more learning to do. anyway, my goal is to make a simple login form with a database of its users. How do I code it. The structure of my form is it has 2 unbound txtbox and 1 command button. A user will input its username and password then when the command button is clicked it will validate the user table if the data encoded is in the database. Thanks hope u can help me.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved