obulldog27
Programmer
This is what I want my program to do.
The user inputs data onto a form. About 24 textboxes.
Then their is a print button to view the reports based
on the inputted data.
What I have to do get this to work is add the records
via adodc to a ms access database EMPTY table (one table with no relationships) then with dataenvironment put
then on the datareport which is much easier then coding
it. But I only want the record being inputted to print out (one page), therefore after printing the report I delete everything from the database but I get an error.
"Operation is not allowed when the object is closed"
------------------------------------------------------
Private Sub printfg_Click()
Adodc2.Recordset.AddNew
Adodc2.Recordset!Name = namefg.Text
Adodc2.Recordset!beg_meter_reading = begfg.Text
Adodc2.Recordset!end_meter_reading = endfg.TexT
....
....
....
Adodc2.Recordset.Update
Adodc2.Refresh
''''''print report''''
With DataEnvironment1
If .rsbilladj_FGrep.State = 0 Then
.rsbilladj_FGrep.Open
End If
.rsbilladj_FGrep.Requery
End With
BillingStatementFG.Refresh
If Check1.Value = 1 Then
BillingStatementFG.Show
Else
BillingStatementFG.PrintReport
End If
''''delete report'''''''''
SQL = "DELETE * from finalgasbill"
With Adodc2
.RecordSource = SQL
.Refresh
End With
End Sub
The user inputs data onto a form. About 24 textboxes.
Then their is a print button to view the reports based
on the inputted data.
What I have to do get this to work is add the records
via adodc to a ms access database EMPTY table (one table with no relationships) then with dataenvironment put
then on the datareport which is much easier then coding
it. But I only want the record being inputted to print out (one page), therefore after printing the report I delete everything from the database but I get an error.
"Operation is not allowed when the object is closed"
------------------------------------------------------
Private Sub printfg_Click()
Adodc2.Recordset.AddNew
Adodc2.Recordset!Name = namefg.Text
Adodc2.Recordset!beg_meter_reading = begfg.Text
Adodc2.Recordset!end_meter_reading = endfg.TexT
....
....
....
Adodc2.Recordset.Update
Adodc2.Refresh
''''''print report''''
With DataEnvironment1
If .rsbilladj_FGrep.State = 0 Then
.rsbilladj_FGrep.Open
End If
.rsbilladj_FGrep.Requery
End With
BillingStatementFG.Refresh
If Check1.Value = 1 Then
BillingStatementFG.Show
Else
BillingStatementFG.PrintReport
End If
''''delete report'''''''''
SQL = "DELETE * from finalgasbill"
With Adodc2
.RecordSource = SQL
.Refresh
End With
End Sub