Hi
I (and the users I deal with) are UK based, but as part of a multinational company. As a result, we often receive documents that have originated in other countries, created in languages other than UK English. These documents can be used as the source for new documents, which are ostensibly...
When you are executing your code, what value does your SalesDate object hold? If you're not sure how to do this, either hold your cursor over the SalesDate text, or add the following line to your code before the update statement:
debug.print SalesDate
You can then view the properties of this...
Try creating a shortcut and putting the following into the target:
"C:\Program Files\Microsoft Office\Office\msaccess.exe" "C:\YourDatabaseDirectory\YourDatabase.mdb" /decompile "C:\YourDatabaseDirectory\YourSecurityFile.mdw"
Replacing the placeholders as necessary.
Hi
I've created a new .mdw file to access my db for security purposes, together with a shortcut that references the .mdw file so that the password prompt only occurs when the users access the db via the shortcut.
My problem is that if I try to open a new instance of Access in the normal way...
I've had the same error sometimes...an alternative approach that may fix it is to create the query using the normal query editor (paste the SQL from earlier into the SQL view), try running the query to see if it runs - that way you can check your SQL. If it works, save your query e.g. qryCheck...
Sorry Tina, got diverted - try modifying your SQL to say
myQry = "SELECT User, Password FROM tblUser WHERE User = me.txtUserName AND Password = me.txtPassword"
You were missing the 'me' in your password string
Try putting a carriage return between
If Not myRs.BOF And Not myRs.EOF Then
and
DoCmd.OpenForm "frmMain_Menu1", acNormal
Access treats single line 'if' statements differently than block 'if' statements. You should then be able to use 'Else' rather than 'Elseif'
Let me know if any...
Bummer....here's the URL:
http://support.microsoft.com/support/kb/articles/Q273/9/56.ASP
It's worth having the above even if it doesn't work in your case...allows you to compact the db without opening it.
Cheers
Muttley
Ok here goes:
Create your form with the following text boxes:
txtUserName
txtPassword
Create a button and then put the following code on the 'On Click' event;
Dim myQry as String
Dim myRs as Recordset
myQry = "SELECT username, password FROM tblSecurity WHERE username = me.txtUserName...
I've had similar problems before, not guaranteeing that any of these will work, but you could try the following:
1. I'm assuming that your compact and repair worked OK - if not try using the Jetcomp Utility (downloadable from the Microsoft Developers Website) - let me know if you need the URL...
Try using the following:
Docmd.setwarnings False
before you run your query, but remember to make sure that your code (including error handling turns your warnings back on) by using the following:
Docmd.setwarnings True
HTH
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.