Marcus, Scott (GEAE, Contractor)
scott.marcus at ae.ge.com
Fri Jul 18 06:36:09 CDT 2003
I'm not sure what you are asking since you say chbProduct1 but the code says
chbProduct and you don't mention if this is in a loop. Never the less, I
think this is what you are looking for.
If chbProduct = True then
Item("ProductCode").Value = Nz(Me![txtProductCode])
If chbA = True then
Item("Number").Value = "2000"
Item("Price").Value = Nz(Me![txtA1])
ElseIf chbB = True then
Item("Number").Value = "3000"
Item("Price").Value = Nz(Me![txtB1])
ElseIf chbC = True then
Item("Number").Value = "4000"
Item("Price").Value = Nz(Me![txtC1])
End If
End If
Scott
-----Original Message-----
From: pedro at plex.nl [mailto:pedro at plex.nl]
Sent: Friday, July 18, 2003 6:01 AM
To: AccessD at databaseadvisors.com
Subject: [AccessD] If .. ElseIf
Hello Group,
the code below is part of a code that i use for mailmerge.
I want to use the value chbA or chbB or chbC only when chbProduct1 = true.
How must the code be changed for this?
TIA
Pedro Janssen
If chbProduct = True then
Item("ProductCode").Value = Nz(Me![txtProductCode])
ElseIf chbA = True then
Item("Number").Value = "2000"
Item("Price").Value = Nz(Me![txtA1])
ElseIf chbB = True then
Item("Number").Value = "3000"
Item("Price").Value = Nz(Me![txtB1])
ElseIf chbC = True then
Item("Number").Value = "4000"
Item("Price").Value = Nz(Me![txtC1])
End If
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com