Automatically Change and Fill in Table Fields

Gunnar Bozeman

New member
Local time
Today, 21:21
Joined
Jun 10, 2003
Messages
9
Hello,

I have a need to update two fields in a table automatically from a radio button on a form. I need help.

When the button is clicked, I want to change the field “Status” from “Future CO” to “CO Issued” and have the field “CO Number” fill in the next chronological CO number based on the last CO number for a given Company (field “CompanyName”). See example of table below.

Code:
SubsID  CompanyName	Status		CO Number
001	Marvin		CO Issued	001
002	Fred		Future CO
003	John		Future CO
003	Marvin		CO Issued	002
005	Fred		Future CO
006	Marvin		Future CO
007	Tom   		CO Issued	001


The results of running the command would be:
Marvin 006 status changed to “CO Issued” and “CO Number” automatically fills in “003”.

Fred 002 and Fred 005 status changed to “CO Issued” and “CO Number” automatically fills in “001” and “002” respectively.

John 003 status changed to “CO Issued” and “CO Number” automatically fills in “001”.

Note that the field “CO Number” is left blank until the status is changed. The CO Number field must know to fill in “001” if blank/null.

Do I run this from code in the form or some type of query? I realize I am asking a lot, but being able to do this will unlock many mysteries for me.

Thank You Much for any help.

Gunnar
 
Last edited:
Thanks Travis.

That's a step in the right direction. I will see how far I can get.

Cheers,

Gunnar
 
Call me uneducated, but that got me no where but confused. It's like being able to read a little japanese.

Can any additional info be given to help me solve this problem.

Thanks.

Gunnar
 

Users who are viewing this thread

Back
Top Bottom