G
guitarfunk24
I don't even know if this is possible but ok here it goes I am making
a database and I would like to make a report that shows the data I
have on a form for new records that i would type in but NOT save the
records into my table so I can print the data out if need be but maybe
I would like to change it before i finalize it. I have a Report
button code to open a report as shown:
Private Sub Add_Component_Click()
On Error GoTo Err_Add_Component_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Add Components List Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Add_Component_Click:
Exit Sub
Err_Add_Component_Click:
MsgBox Err.Description
Resume Exit_Add_Component_Click
End Sub
But here is the other thing because I don't want data saved all the
time i have a code in before update on the form that asks me if i want
the data I typed saved or not. which goes like this:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Cancel = MsgBox("Do you want to save changes to this record?" _
, vbQuestion + vbYesNo + vbDefaultButton2, "Save Record") =
vbNo
If Cancel Then
Me.Undo
End If
End Sub
Now here is the problem when I try and click the button to open the
report it asks me if i want the data saved but i don't and if I dont
my report will not show up. But if i do it will save it then show the
data but ruining my table. So is it possible to show this data on a
report without saving it.
a database and I would like to make a report that shows the data I
have on a form for new records that i would type in but NOT save the
records into my table so I can print the data out if need be but maybe
I would like to change it before i finalize it. I have a Report
button code to open a report as shown:
Private Sub Add_Component_Click()
On Error GoTo Err_Add_Component_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Add Components List Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Add_Component_Click:
Exit Sub
Err_Add_Component_Click:
MsgBox Err.Description
Resume Exit_Add_Component_Click
End Sub
But here is the other thing because I don't want data saved all the
time i have a code in before update on the form that asks me if i want
the data I typed saved or not. which goes like this:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Cancel = MsgBox("Do you want to save changes to this record?" _
, vbQuestion + vbYesNo + vbDefaultButton2, "Save Record") =
vbNo
If Cancel Then
Me.Undo
End If
End Sub
Now here is the problem when I try and click the button to open the
report it asks me if i want the data saved but i don't and if I dont
my report will not show up. But if i do it will save it then show the
data but ruining my table. So is it possible to show this data on a
report without saving it.