Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fields on main form from sub form

Status
Not open for further replies.

briant

Technical User
Apr 15, 2000
4
AU
I have a sub form which has option buttons to choose the type of commission and calculate the commission based on values on the main form.<br>I find that unless I place &quot;Forms!Sold!&quot; in front of all the field names relating to the main form (Sold), I get an error.<br><br>Does anyone know how to get around this.<br><br>Thanks,<br><br>Brian<br><br>Private Sub Normal_GotFocus()<br><br>Forms!Sold!COMMISSION = Nz(NETTPRICE) - Nz(NORMAL * 8) - Nz(TOPUP * 6.125) - Nz(SUPPLY * 6.83333) - Nz(ROOFLIFT * 11.5834) - Nz(POLYINSTAL * 8) - Nz(POLYSUPPLY * 7.08333) - Nz(POLYROOFLI * 11.5834) - Nz(REMBATTS * 2.5) - Nz(DISREMBATT * 3.333) - Nz(FLEXICOAT * 0.79167) - Nz(CHARGEX) - Nz(FINANCEX * PERIOD * 0.02) * 0.6<br><br>End Sub<br><br>
 
No Probably not.<br>Welcome to Access.<br>At least you fixed the problem yourself.<br>Move on the next thing. <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
You can use &quot;Me&quot; to substitute for &quot;Forms!MainFormName&quot;.<br>You can use the &quot;With&quot; stmt format.<br>You can dim variables and set the values = to the fields.<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top