Hello,
I'm trying to figure out how I can click a command button that will select specific fields on one form and paste the values from those fields into another form with matching fields.
I have a form that has another form laying over the top of it. The "base" form has records that I can scroll through. The form that I overlaid is for historical notes. I tied one field together so the overlay will populate whenever a certain field matches. When I come across a record from the main form and want to make notes in the overlaid form, I want to be able to copy over specific fields to the overlaid form.
I've tried these below without success.
<code>
Option Compare Database
Private Sub Command24_Click()
Forms!frm_fuel_fraud_results!ELEMENT_SERVICE_CARD = Forms!frm_Fuel_Fraud_Notes!SERVICE_CARD_NUMBER
'Forms!frm_fuel_fraud_results.ELEMENT_SERVICE_CARD.Value = Forms!frm_Fuel_Fraud_Notes.SERVICE_CARD_NUMBER.Value
'frm_Fuel_Fraud_Results![ELEMENT SERVICE CARD] = Me.[SERVICE CARD NUMBER]
Forms!("frm_Fuel_fraud_Results").ELEMENT_SERVICE_CARD = Me.SERVICE_CARD_NUMBER
'frm Fuel Fraud Results.ELEMENT SERVICE CARD = frmFuel Fraud Notes.SERVICE CARD NUMBER
'Me.ELEMENT SERVICE CARD.Value = Me.SERVICE CARD NUMBER.Value
'Me.feepayeraddress2.Value = Me.address1b.Value
'Me.feepayeraddress3.Value = Me.address1c.Value
End Sub
</code>
Any help would be great!
I'm trying to figure out how I can click a command button that will select specific fields on one form and paste the values from those fields into another form with matching fields.
I have a form that has another form laying over the top of it. The "base" form has records that I can scroll through. The form that I overlaid is for historical notes. I tied one field together so the overlay will populate whenever a certain field matches. When I come across a record from the main form and want to make notes in the overlaid form, I want to be able to copy over specific fields to the overlaid form.
I've tried these below without success.
<code>
Option Compare Database
Private Sub Command24_Click()
Forms!frm_fuel_fraud_results!ELEMENT_SERVICE_CARD = Forms!frm_Fuel_Fraud_Notes!SERVICE_CARD_NUMBER
'Forms!frm_fuel_fraud_results.ELEMENT_SERVICE_CARD.Value = Forms!frm_Fuel_Fraud_Notes.SERVICE_CARD_NUMBER.Value
'frm_Fuel_Fraud_Results![ELEMENT SERVICE CARD] = Me.[SERVICE CARD NUMBER]
Forms!("frm_Fuel_fraud_Results").ELEMENT_SERVICE_CARD = Me.SERVICE_CARD_NUMBER
'frm Fuel Fraud Results.ELEMENT SERVICE CARD = frmFuel Fraud Notes.SERVICE CARD NUMBER
'Me.ELEMENT SERVICE CARD.Value = Me.SERVICE CARD NUMBER.Value
'Me.feepayeraddress2.Value = Me.address1b.Value
'Me.feepayeraddress3.Value = Me.address1c.Value
End Sub
</code>
Any help would be great!