Pedro Janssen
pedro at plex.nl
Fri Jul 18 15:39:22 CDT 2003
Hello Scott, sorry that i misled You with the chbProductCode1. It had to be chbProductCode. You answer did the trick, i didn't know that you could use If .. Then in stages. Thanks for the help Pedro ----- Original Message ----- From: "Marcus, Scott (GEAE, Contractor)" <scott.marcus at ae.ge.com> To: "'Access Developers discussion and problem solving'" <accessd at databaseadvisors.com> Sent: Friday, July 18, 2003 1:36 PM Subject: RE: [AccessD] If .. ElseIf > 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 > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >