yddadsjd95
asked on
Setting default values for a new record
Great Day, I am creating a job order for an automotive repair shop. When I open an estimate to review it, all of the data has populated the form properly; however, when I create a new estimate, customer name and address and customer vehicle make, model and year, I expected to automatically populate the appropriate fields, but they did not.
Do I need to code the default value for those fields or is there a way for access to automatically do it when a new record is detected?
Thanks in advance,
David
Do I need to code the default value for those fields or is there a way for access to automatically do it when a new record is detected?
Thanks in advance,
David
ASKER
I am unable to get a default value to load when the form opens to a new record. This is the code that I used to test one field
If Me.NewRecord Then
'Set the defaults
Forms!FrmJob!frmJobSub.For m!txtStree tAddress.D efaultValu e = " Forms! frmCustomerContactData!Str eetAddress " _
End If
I am attempting to use the data that is in the form (frmCustomerContactData) that opened the Estimate/Work Order (frmJobOrder). When I check the Immediate Window, there is a value for txtStreetAddress; however, nothing loads on the form when it opens.
Thanks in advance for your assistance.
r/David
If Me.NewRecord Then
'Set the defaults
Forms!FrmJob!frmJobSub.For
End If
I am attempting to use the data that is in the form (frmCustomerContactData) that opened the Estimate/Work Order (frmJobOrder). When I check the Immediate Window, there is a value for txtStreetAddress; however, nothing loads on the form when it opens.
Thanks in advance for your assistance.
r/David
If Me.NewRecord Then
'Set the defaults
Forms!FrmJob!frmJobSub.Form!txtStreetAddress.DefaultValue = " Forms! frmCustomerContactData!StreetAddress" _
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Jeff, I'm working on it.
ASKER
Thank you Jeff, I worked on this for quite some time before I was able to get it to work. Thanks a million. However, now I am running into another issue where when I open the form Access is asking for a parameter, which I will address under a new question.
Have a great day and an even finer day tomorrow.
Have a great day and an even finer day tomorrow.
ok
ASKER