I
Ivan R via AccessMonster.com
Okay I have a form whose caption is based on some information on the form.
The information updates the caption at every change. For example the caption
at a new record will read "Background Analysis Database", however when there
is information entered for a specific record, the database will change the
caption to "Background Check for LastName, FirstName Middlename". My problem
or bug appears when I start to change the FirstName field. There is code
behind the fields that will automatically update the caption at each change
for the field, however on the FirstName field when you first enter the first
change, the first letter is selected and over written, the user then has to
go back over and retype the first letter or it causes them to be off by one
letter. The code I have entered in the background goes as follows, and it is
entered in the On Change event:
DoCmd.RunCommand acCmdSaveRecord
UpdateCaption
UpdateCaption is a small module which saves me some typing it goes like this:
Dim fstname, lstname, midname, Name As String
fstname = Forms![main form]![applicant firstname]
lstname = Forms![main form]![Applicant LastName]
midname = Forms![main form]![Applicant MiddleName]
Name = lstname & ", " & fstname & " " & midname
Me.Caption = "Background Check for " & Name
Any help or suggestions would be appreciated.
The information updates the caption at every change. For example the caption
at a new record will read "Background Analysis Database", however when there
is information entered for a specific record, the database will change the
caption to "Background Check for LastName, FirstName Middlename". My problem
or bug appears when I start to change the FirstName field. There is code
behind the fields that will automatically update the caption at each change
for the field, however on the FirstName field when you first enter the first
change, the first letter is selected and over written, the user then has to
go back over and retype the first letter or it causes them to be off by one
letter. The code I have entered in the background goes as follows, and it is
entered in the On Change event:
DoCmd.RunCommand acCmdSaveRecord
UpdateCaption
UpdateCaption is a small module which saves me some typing it goes like this:
Dim fstname, lstname, midname, Name As String
fstname = Forms![main form]![applicant firstname]
lstname = Forms![main form]![Applicant LastName]
midname = Forms![main form]![Applicant MiddleName]
Name = lstname & ", " & fstname & " " & midname
Me.Caption = "Background Check for " & Name
Any help or suggestions would be appreciated.