Hi there,
I have several forms (sales order, purchase order, invoice) that all use one "notes" form.
When i click a button on the origin form it opens the "notes" form and populates the "Tbl_Note_Parent_Ref" field with the reference from the origin form
but.. if the origin ref ([crm-1-ref]) is for example "1000-10" instead of populating the "Tbl_Note_Parent_Ref" with the text is calculates and inputs a result so.. "990"
Basically, click to popup the notes form, add the new note, when closed the origin form displays the new note in the note section
Here is the code i am using.
(Notes form)
The code for the button on origin form (one fo 3 forms with similar code)
Im just interested to see if there is a way to utilising the origin field as text only without acces making a calculation of it.
Or if there is a simpler way to have several forms
I have several forms (sales order, purchase order, invoice) that all use one "notes" form.
When i click a button on the origin form it opens the "notes" form and populates the "Tbl_Note_Parent_Ref" field with the reference from the origin form
but.. if the origin ref ([crm-1-ref]) is for example "1000-10" instead of populating the "Tbl_Note_Parent_Ref" with the text is calculates and inputs a result so.. "990"
Basically, click to popup the notes form, add the new note, when closed the origin form displays the new note in the note section
Here is the code i am using.
(Notes form)
Code:
Private Sub Form_Current()
If Not IsNull(Me.OpenArgs) And Me.NewRecord Then
Me.Tbl_Note_Parent_Ref.DefaultValue = Me.OpenArgs
End If
End Sub
The code for the button on origin form (one fo 3 forms with similar code)
Code:
Private Sub Bttn_Add_New_Note_Click()
DoCmd.OpenForm "Frm_Note_Add_New", acNormal, , , acFormAdd, acDialog, [crm-1-ref]
Me.Refresh
End Sub
Im just interested to see if there is a way to utilising the origin field as text only without acces making a calculation of it.
Or if there is a simpler way to have several forms