Expression builder Automating forms check boxes

T

TravelingHT

I need to find a book that tells me how to create code in general.
I have "Access 2003 InsideOut" and chapter 13 is tough. Also I have gone
through the Articles. Not much help.

I am currently have a form with check boxes for regions in the USA. I also
have check boxes for individual states. I want to automate so if a region is
checked then all the states also become checked.

Thanks in advance.


--
Anthony Williams
Histotech Exchange LLC
19 Whitmore St.
Lexington, VA 24450
(e-mail address removed)
 
M

Maurice

Wouldn't it be an option to use an update query for this?

In your code you could do a check like:

if me.chkRegion="checkname" then
docmd.openquery "name of query here"
end if

the query could contain a criterium where region="regionname" and set the
updatefield to -1 or yes

I don't know how you've set up the checkboxes on your form that's where your
mind comes in...
 
T

TravelingHT

Dear Maurice:

Sorry for this but I am a little shaky with the whole Access thing. So to
clarify what I understand from your first sujestion:
I should create a query based on my underlying database and in that I should
add all the code you provided (Thanks for the code by the way)and have that
query as the record source for the form. Doing all my automation for all the
different fileds (or record sources, not sure of the proper notaion) in that
query?

Thinking about it can I use the query to do as many changes as I want to as
many fields as I want.

Or are you telling me to use the code in the “Expression Builder� for that
combo box?

Or is there a third way and then we can throw out both the democrats and
republicans?

Also can you explain your code and possibly recommend a good book I can buy
to learn more? And what is the name for this code, visual basic or?

if I UNDERSTAND
me. I DO NOT UNDERSTAND
chkRegion= I ASSUME TELLS COMPUTER WHICH BOUND CONTROL TO WORK ON
"checkname" I ASSUME MEANS THE SPECIFIC DATA I WANT RECOGNISED TO START
THIS WHOLE PROCESS
docmd. I DO NOT UNDERSTAND
openquery I ASSUME MEANS OPEN A QUERY
"name of query here" I UNDERSTAND
end if TELLS COMPUTER THAT IS THE END OF THE PROGRAM

Thanks in advance, apreciate all the help.
--
Anthony Williams
Histotech Exchange LLC
19 Whitmore St.
Lexington, VA 24450
(e-mail address removed)
 

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

Top