Adodc1 is declared as adodb recordset.
i have tried on using
Set expdr.DataSource = Adodc1
Adodc1.Close
expdr.Show
End Sub
but still i get the error as "Operation is not allowed when the object is closed"
Thanks
Hi,
I would like to close the database connection when i close the data report. I am using the following to call the data report to show the report.
Private Sub Command5_Click()
Dim st As String
Dim good As String
Dim a As Date, b As Date
good = Chr(35)
a = sdt1
b = edt2
str =...
I want to generate data report through a Query. I have used the following code
Private Sub Command7_Click()
Dim Adodc1 As New ADODB.Recordset
Dim str As String
Dim st As String
Dim good As String
Dim a, b As Date
good = Chr(35)
st = "EC11"
a = Format(Date + 15, "dd/mm/yyyy")
b = Format(Date +...
I am trying to load image in a imagebox in the click event of a combobox I have used the below code:
Private Sub cbvno_Click()
Dim Adodc3 As New ADODB.Recordset
Dim str3 As String
Dim adoconn As New ADODB.Connection
Dim rsImage As dao.Recordset
Const conChunkSize = 8192
str3 =...
hi Andrzejek,
Well i got you point but wht i want to do is want a particuler user to have limited access throught the session until he logs out and the admin can have full session. So is there any way for that
Hi,
I am trying to develop a application where i need to give limited user to some of the user and administrator with full access. I am using access as database. Could anyone tell me like how do i keep the user active through out the session until he logs out.
OR
Is there any other way that...
Hi guys,
I got your point and i know that it depends on the system format.
Well if it me i could change the system format on my machine and do it but if this application which i am making is to be used on another computer and that user is not aware of this then he ends up getting wrong dates...
I have tried inserting date using Combobox (which was posted previously) Now i would like to use text box to insert date and then retrive baxk from the access database. I tried as follows:
Dim Adodc1 As New ADODB.Recordset
Dim str As String
Dim da As Date
Dim ans As String
Dim d As String...
Hi,
I am trying to input date to database using combobox. as follows
dim d as date
dim da as date
da = c1 & "/" & c2 & "/" & c3
d = Format(CDate(da), "dd/mm/yy")
With Adodc1
.AddNew
MsgBox " Date " & d
!daterem = Format(CDate(da), "dd/mm/yy")
MsgBox "Date...
I want to display records from the database. I am trying to move from last to first. I have written the code as below:
Private Sub cmdPrevious_Click()
rs.MovePrevious
If rs.BOF = True Then
MsgBox "This is the First record.", vbExclamation, "Note it..."
rs.MoveFirst...
lastly i have picture box. when i load picture in the box the image being large does not fit in. Is there a way to minimize that image in this code it self.
Hi thanks,
Finally with your help i was able to do it thanks a lot.
This was to save image to database. I still remain to retrive image from database if there is any further query will come back
Thanks a lot SBerthold
I tried as you told me as below
Set objDB = DBEngine.Workspaces(0).OpenDatabase("D:\Flash\Backup\Navin VB\Expriment\Vechdetail.mdb")
Now i get another error as Unrecognized database format..
SBerthold,
I tried it again but still get the same error,
Below is the original code from where i copied. When is copy that again and use it, it fails
Dim rsImage As Recordset
Dim lOffset As Long
Dim lSize As Long
Dim sPath As String
Dim nHandle As Integer
Dim...
Thanks SBerthold.
As you say u have copied this code. I am new to VB Porgramming. But this code works fine on it own and don't get any error. I start getting error only i copied it to my project.
So could you please guide me on where should the changes effect
I am writing a code to input image to a access datebase where in the path of the image is stored in the database.
Below code gives me a runtime error 91 Object variable or with block variable not set.
Private Sub cmdAddImage_Click()
Dim objDB As Database
Dim rsImage As New...
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.