UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Starting New Record on Form, Zero as Integer    
 
   
Jbarbeau
post Jan 6 2005, 10:04 AM
Post #1

UtterAccess Member
Posts: 40



I've almost completed my form for my Paramedic and EMT class, but I have another simple question.
How does one start a new record with all the values = 0 as an integer.

I would like my unbound and bound fields to actually display a 0 in the field upon a new record, and for the records that have been created, say I pull that back up through a search, to display 0's once again in just the unbound boxes.
Is there a onload command that I can devise for the form?
Go to the top of the page
 
+
ScottGem
post Jan 6 2005, 10:18 AM
Post #2

UtterAccess VIP / UA Clown
Posts: 25,091
From: LI, NY



Set the Default value of the Control to 0

HTH
Go to the top of the page
 
+
Jbarbeau
post Jan 6 2005, 10:24 AM
Post #3

UtterAccess Member
Posts: 40



Hrmm, Yes, I have tried this but there are no 0's displayed.
Go to the top of the page
 
+
ScottGem
post Jan 6 2005, 10:31 AM
Post #4

UtterAccess VIP / UA Clown
Posts: 25,091
From: LI, NY



The default value of a control displays when you start a new record. If you need to display them at another time you will need to cycle through the controls and set the value.
Go to the top of the page
 
+
Jbarbeau
post Jan 6 2005, 10:43 AM
Post #5

UtterAccess Member
Posts: 40



Ok, Maybe I am not asking the right question.

I have a set of unbound text boxes that i want to display 0 until I enter a number into them.
I want the default to actually be 0 and display a zero, not just be zero as a default.

So in essence, I want the text boxes to "Display" the zero when a new record starts, and when the old record is retrieved.

Im using these text boxes for math essentially.
For instance: OnLoad
A1 = 0
A2 = 0
A3 = 0
Atotal = 0
I want this to be displayed in the boxes until I enter a value
So if I enter
A1 = 1
A2 = 0
A3 = 0
ATotal = 1 (and ATotal is also a bound box from the Table)

Any Ideas ?
Go to the top of the page
 
+
Jbarbeau
post Jan 6 2005, 10:53 AM
Post #6

UtterAccess Member
Posts: 40



Strange, bugger works now.

Thanks
Go to the top of the page
 
+
Jbarbeau
post Jan 6 2005, 10:55 AM
Post #7

UtterAccess Member
Posts: 40



Accept the numbers stay in the unbound box when I start a new record.
Go to the top of the page
 
+
ScottGem
post Jan 6 2005, 11:30 AM
Post #8

UtterAccess VIP / UA Clown
Posts: 25,091
From: LI, NY



Default values may only work for bound controls. You might have to explicitly reset the unbound controls in the On Current event.
Go to the top of the page
 
+
Jbarbeau
post Jan 6 2005, 11:34 AM
Post #9

UtterAccess Member
Posts: 40



How do I do that in the on Current ?
Go to the top of the page
 
+
ScottGem
post Jan 6 2005, 12:06 PM
Post #10

UtterAccess VIP / UA Clown
Posts: 25,091
From: LI, NY



Me!controlname = 0
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 25th May 2013 - 10:22 AM