benkingery
Registered User.
- Local time
- Today, 00:20
- Joined
- Jul 15, 2008
- Messages
- 153
I have a section of VBA that is working almost 100% properly, but I'm having trouble with something. When I double click on a property within Form A, then Form B opens and much of the data is filled in based on the values in Form A. I recently added two properties to Form B and just like the other properties on Form B, I want them populated based on the values contained in Form A. Here is my code:
As I said, it works almost 100% but for some reason, I can't get the "SM" to match up with [Forms]![Master_Parent_TransferForm].SM_CurrentOnhand. For some reason, only this field will not come over. If the underlying value in Form A of SM_CurrentOnhand is "0", then SM will populate correctly in Form B. If it is anything other than "0", it just comes over as a null value.
Any thoughts? This is VERY wierd.
Thanks in advance.
Code:
Private Sub Master_Child_DblClick(Cancel As Integer)
DoCmd.OpenForm "Master_Parent_TransferForm", acNormal, , , acFormEdit
[Forms]![Master_Parent_TransferForm].Master_Child = Master_Child
[Forms]![Master_Parent_TransferForm].OS_Child = OS_Child
[Forms]![Master_Parent_TransferForm].AZ_Child = AZ_Child
[Forms]![Master_Parent_TransferForm].TG_Child = TG_Child
[Forms]![Master_Parent_TransferForm].SH_Child = SH_Child
[Forms]![Master_Parent_TransferForm].QV_Child = QV_Child
[Forms]![Master_Parent_TransferForm].CS_Child = CS_Child
[Forms]![Master_Parent_TransferForm].SC_Child = SC_Child
[Forms]![Master_Parent_TransferForm].SR_Child = SR_Child
[Forms]![Master_Parent_TransferForm].NB_Child = NB_Child
[Forms]![Master_Parent_TransferForm].MJ_Child = MJ_Child
[Forms]![Master_Parent_TransferForm].WM_Child = WM_Child
[Forms]![Master_Parent_TransferForm].KH_Child = KH_Child
[Forms]![Master_Parent_TransferForm].BY_Child = Buy_Child
[Forms]![Master_Parent_TransferForm].EB_Child = EB_Child
[Forms]![Master_Parent_TransferForm].SM_Child = SM_Child
[Forms]![Master_Parent_TransferForm].OS_CurrentOnhand = OS
[Forms]![Master_Parent_TransferForm].AZ_CurrentOnhand = AZ
[Forms]![Master_Parent_TransferForm].TG_CurrentOnhand = TG
[Forms]![Master_Parent_TransferForm].SH_CurrentOnhand = SH
[Forms]![Master_Parent_TransferForm].QV_CurrentOnhand = QV
[Forms]![Master_Parent_TransferForm].CS_CurrentOnhand = CS
[Forms]![Master_Parent_TransferForm].SC_CurrentOnhand = SC
[Forms]![Master_Parent_TransferForm].SR_CurrentOnhand = SR
[Forms]![Master_Parent_TransferForm].NB_CurrentOnhand = NB
[Forms]![Master_Parent_TransferForm].MJ_CurrentOnhand = MJ
[Forms]![Master_Parent_TransferForm].WM_CurrentOnhand = WM
[Forms]![Master_Parent_TransferForm].KH_CurrentOnhand = KH
[Forms]![Master_Parent_TransferForm].BY_CurrentOnhand = BY
[Forms]![Master_Parent_TransferForm].EB_CurrentOnhand = EB
[Forms]![Master_Parent_TransferForm].SM_CurrentOnhand = SM
End Sub
As I said, it works almost 100% but for some reason, I can't get the "SM" to match up with [Forms]![Master_Parent_TransferForm].SM_CurrentOnhand. For some reason, only this field will not come over. If the underlying value in Form A of SM_CurrentOnhand is "0", then SM will populate correctly in Form B. If it is anything other than "0", it just comes over as a null value.
Any thoughts? This is VERY wierd.
Thanks in advance.