Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading Form Code Question

Status
Not open for further replies.

ITheadache

IS-IT--Management
Jun 13, 2006
45
US
Is there a way that when loading a form to have to do the following without using a do while loop?

I want to have a check box check yes if

qtyordered = qtyshipped

thanks

Bryan
 
What are qtyordered and qtyshipped?

If they are variables then you can do this very easily using (assuming they can be directly compared each other, they are comparable datatypes, e.g. both integers or strings):
Code:
'In the Form_Load event
If qtyordered = qtyshipped Then Check1.Value = 1 Else Check1.Value = 0 'replace Check1 with the name of your checkbox
Hope this helps

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
You may find that you need to use the Form_Activate event, as the controls on the form are not always completely loaded in the Form_Load event

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Agreed John, that's what I was hoping to clear up with my first question, probably would have been better for me to explain why I asked it to the OP [smile]

HarleyQuinn
---------------------------------
Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top