Hi
I have a form frmCurrency with two buttons one called GBP and the other EURO.
On clicking any of the two buttons a second form frmInvoice opens on a new record and a check box called Euro therein is set.
The purpose of ths is only to set the sign ie € or £ not convert the value.
or
Then I have placed the following code on the On Current Event of the opened Form ie frmInvoice.
It works but it sets all the records. I only require the new record created to be set the other existing record values will not change.
ViRi
I have a form frmCurrency with two buttons one called GBP and the other EURO.
On clicking any of the two buttons a second form frmInvoice opens on a new record and a check box called Euro therein is set.
The purpose of ths is only to set the sign ie € or £ not convert the value.
Code:
'GBP button On Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmInvoice"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec
Forms!frmInvoice!Euro = False
RunCommand acCmdSaveRecord
or
Code:
'EURO button On Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmInvoice"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec
Forms!frmInvoice!Euro = True
RunCommand acCmdSaveRecord
Then I have placed the following code on the On Current Event of the opened Form ie frmInvoice.
Code:
Dim E As TextBox
Set E = Forms!frmInvoice!Text65
Euro.SetFocus
If Me.Euro = True Then
E.Format = "€0.00"
Else
E.Format = "£0.00"
End If
It works but it sets all the records. I only require the new record created to be set the other existing record values will not change.
ViRi