Automating data in a table field

  • Thread starter Thread starter Radhika
  • Start date Start date
R

Radhika

I have a table which inculde two fileds. Field 1 called "Injection" is a
Yes/No box. Field 2 called "#of Injections" is a number column. I want to
have an automated function, where if "No" is selected in "Injection", "# of
Injections" automatically fills in a value of "0". How do i do this in a
table?

Thankyou!
 
On Tue, 22 Jan 2008 18:01:05 -0800, Radhika

There is no way to do that. Reason: tables are not part of the user
interface of a normal application. Rather you would create a form,
perhaps in datasheet mode to simulate the table view, and then you can
write a single line of code in the Injection_AfterUpdate event:
If Me.Injection=False then Me.[#of Injections]=0

-Tom.
 
I tried doing exactly that, but the code does not seem to be working.
Everytime i select 'No' in the injection box, '0' does not automatically show
up in the '# of Injections' box? What can i be doing wrong.

Thankyou!

Tom van Stiphout said:
On Tue, 22 Jan 2008 18:01:05 -0800, Radhika

There is no way to do that. Reason: tables are not part of the user
interface of a normal application. Rather you would create a form,
perhaps in datasheet mode to simulate the table view, and then you can
write a single line of code in the Injection_AfterUpdate event:
If Me.Injection=False then Me.[#of Injections]=0

-Tom.

I have a table which inculde two fileds. Field 1 called "Injection" is a
Yes/No box. Field 2 called "#of Injections" is a number column. I want to
have an automated function, where if "No" is selected in "Injection", "# of
Injections" automatically fills in a value of "0". How do i do this in a
table?

Thankyou!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top