Pedro Janssen
pedro at plex.nl
Fri Jul 18 16:31:35 CDT 2003
Hello Group,
the code below is part of a code that i have to write in about five versions for 10 ProductCode's.
This is a lot of typing, copying, pasting and you can't let your mind slip away, otherwise you make mistakes. Is there a shorter and quicker way?
TIA
Pedro Janssen
If chbProductCode1= True then
.Item("ProductCode1").Value = Nz(Me![txtProductCode1])
If chbA1 = True then
.Item("Number1").Value = Nz(Me![txtNumber])
.Item("Price1").Value = Nz(Me![txt1c16])
ElseIf chbA2 = True then
.Item("Number1").Value = Nz(Me![txtNumber])
.Item("Price1").Value = Nz(Me![txt1c17])
ElseIf chbA3 = True then
.Item("Number1").Value = Nz(Me![txtNumber])
.Item("Price1").Value = Nz(Me![txt1c18])
ElseIf chbUitz1 = True then
.Item("Number1").Value = Nz(Me![txtUitz1Number])
.Item("Price1").Value = Nz(Me![txtUitz1Price])
End If
End If
If chbProductCode2= True then
.Item("ProductCode2").Value = Nz(Me![txtProductCode2])
If chbA1 = True then
.Item("Number2").Value = Nz(Me![txtNumber])
.Item("Price2").Value = Nz(Me![txt2c16])
ElseIf chbA2 = True then
.Item("Number2").Value = Nz(Me![txtNumber])
.Item("Price2").Value = Nz(Me![txt2c17])
ElseIf chbA3 = True then
.Item("Number2").Value = Nz(Me![txtNumber])
.Item("Price2").Value = Nz(Me![txt2c18])
ElseIf chbUitz2 = True then
.Item("Number2").Value = Nz(Me![txtUitz2Number])
.Item("Price2").Value = Nz(Me![txtUitz2Price])
End If
End If
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030718/db9e10e9/attachment.html>