I'm writing code to populate a drop down box using Access 2000. When I open the form I get the following error message (error occurs with cnn.open) " -2147467259 The database has been placed in a state by user 'Admin' on machine 'XYZ' that prevents if from being opened or locked"
Has...
Hi,
This will solve your problem.
Steps:
1. Copy the database (.mdb) to your system
2. Right click on the .mdb file and select properties
3. Remove the check from the read only attribute.
4. Change your connection string to the appropiate
drive\path\filename "Keep Your...
Hi,
Change the field (mailing) to accept NULLs. Also data type bit only allows 0 or -1. Using 1 as a default value for a bit data type will give you fits.
"Keep Your Code Tight"
The checkbox style property is read-only and can only be set at design-time. You may want to consider using the toggle button component. This component can be found by adding the "Microsoft Forms 2.0 Compenent Library" to your project.
Reidfl "Keep Your Code Tight"
This should solve your problem. Change the EOFAction property to 2-adDOAddNew in the design-mode.
By the way I highly recommend use ADO the data control is very restrictive.
reidfl "Keep Your Code Tight"
stnkyminky,
I ran your code and made the following corrections. The code connected and disconnectd from the database and released the lock on the database.
Option Explicit
Dim Project_My_Conn As ADODB.Connection
Dim Project_rs As ADODB.Recordset
Private Sub Form_Load()
ProjectConnect...
Sypher2,
Add the commondialog control to your form(s). I normally add print menu option to my applications and use the below listed code snippet to print forms (hasn't failed me yet).
Private Sub mnuPrint_Click()
On Error GoTo CancelError
Dim iNum As Integer
With CommonDialog1...
You must use the UPDATE method of recordset.
Example:
sRTF = Replace(rtfTasks.TextRTF, "\ulnone", "\ul0")
rsActive("Tasks") = sRTF
rsActive.update
ErrHandler:
if err then
rsActive.cancelupdate
end if
reidfl
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.