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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check fields and lock text box if not empty

Status
Not open for further replies.

Trestkon

Technical User
Apr 2, 2004
26
CA
Ahoy!

Firstly, I'm sorry if this is in the wrong section. I *think* it's going to be solved by a query, but I'm not entirely certain.

What I have is this: Form A is used to enter upcoming Assignments and the proposed/estimated total budgets for upcoming years. Each entry has a button which leads to Form B (Assignment Details) form where more details on the budget for that Assignment can be entered.

The workflow will be such that a user will first go through Form A and and enter all of the Assignments and their estimated/proposed budgets. If detailed budget information is known (and it won't be, for later years) they will click through to Form B and enter in the budget details (which consists of several different items).

This is where my problem comes in. The way I want it to work is that if a user has entered detailed budget information in Form B, then that detailed information should be summed and displayed (superseeding any other entry) as the total budget in Form A. The budget text boxes in Form A would also then be locked to prevent the user form entering a number which would not jive with the sum of the budget details.

I hope that made some sense. I imagine it's not terribly difficult to carry out, but I'm at a loss for how to do it. Please let me know if my explaination is mostly gibberish, and I'll attempt to make it more clear :)

Thanks in advance!
 
It is really a forms / VBA solution.

I don't know if you can dynamically change the lock property on form's controls or not. If so you could set the property as appropriate on the form's On Current event. The alternative would be to do data validation on the BEFORE Update event and cancel the update if your test is met. In either case, I think you will use the dsum function.

That is the short answer... I don't know if that is enough to get you going or not. In either case let us know if it works out or if you need more help.
 
Thanks for the response, lameid!

My problem is actually more based on the Query. I'm not sure how to create something that will check whether or not certain fields have values in them, and if they do, sum those values.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top