setting values in tabular form

JaredNJames

Registered User.
Local time
Today, 06:55
Joined
Jul 7, 2007
Messages
87
hi, if i have a form which is in tabular format, is it possible to have it so that when the form opens, all values in a particular column are set to "0"?

Jared James
 
additional:
i currently have:
onload event of the form is [Additional] = 0

but this only puts the first value in the additional column as 0, the rest stay as they are.

jared james
 
Just set the controls' default property to 0 and for new records it will be 0 and for existing ones the value that exists will be there.
 
you dont seem to understand me here.

i want it so that all values are "nullified" on load of the form and set to 0.

i want it to wipe all current values and set them to 0.

thanks
jjames
 
you dont seem to understand me here.

i want it so that all values are "nullified" on load of the form and set to 0.

i want it to wipe all current values and set them to 0.

thanks
jjames

Okay, a couple of things for you.

1. Null isn't to be used as a value (see this post

http://www.access-programmers.co.uk/forums/showthread.php?t=131593

for more information)

2. If you change the value to 0 it isn't null anyway. So, setting something to zero on load is just as simple as doing this in the Form's On Load Event:

If text -
Code:
Me.YourTextBoxNameHere = "0"

If Numbers
Code:
Me.YourTextBoxNameHere = 0

If combo or list box
Code:
Me.YourComboBoxOrListBoxName = ""
 
hi, i used null, not in terms of acccess, but in terms of clearing the field of its value and inserting a 0.

i have put in your code as above and it only clears the first record.

the tabular form i have is a list of loads of different items and how many to order.

the [additional] field is there so they can order more of them. when they put a value in it remains in the parts table (where the field originates) until the next time they use it.

when the form loads with the above code, it wipes the value from the first field, but leaves all others there.
 

Users who are viewing this thread

Back
Top Bottom