K
Kathy
I am creating a form with a subform...the tables behind the forms are
PatientData and MedicationRecord in a one-to-many relationship with
strChartID as the primary key and linking field. I would like to generate a
unique chart number and so far I have built the following:
Private Sub strChartID_Enter()
If Me.NewRecord Then
Me.strChartID = Left([strLast], 3) & Left([strFirst], 2) & "00" &
[autoNumber]
End If
End Sub
This code seems to be working, but I am nervous to use it (since I am an
insecure newcomer) and I am not sure about using the autoNumber? Is there a
better way? Or a more secure code?
Any advice is much appreciated.
PatientData and MedicationRecord in a one-to-many relationship with
strChartID as the primary key and linking field. I would like to generate a
unique chart number and so far I have built the following:
Private Sub strChartID_Enter()
If Me.NewRecord Then
Me.strChartID = Left([strLast], 3) & Left([strFirst], 2) & "00" &
[autoNumber]
End If
End Sub
This code seems to be working, but I am nervous to use it (since I am an
insecure newcomer) and I am not sure about using the autoNumber? Is there a
better way? Or a more secure code?
Any advice is much appreciated.