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

MS Access 2000 VBA, Help

Status
Not open for further replies.

ds2728

Programmer
Jul 18, 2001
50
US
I am building a database by building basically an array to hold all my values before I write a record to the table. This is done because the values come from querys and calculations from around 75 different source tables. heres my problem; I need to over ride the value of one of the variables that contain the correct information according to the already completed process. I want this to be dynamic in nature by adding to a table the variable name and value so I do not have to code each and every manual over ride.

My idea was to make a table with two fields name and value where name matches the variable name that needs to over ride and the value to over ride with.

I do not know how to dynamically match the data in the table with the variable in the code.

I hope I explained it so you understand if not I will answer any questions.

Thanks.
 
Well I didn't quite follow the whole thing. But I'm old and slow to catch on. Are you looking up the value? Doesn't appear correct, because (aparently) you need to replace this? You are looking up the variable (name)? But then where do you put the value associated with the name? Yoou would need a 'Map' of where (and perhaps HOW) the variable was used? On the other hand, you appear to KNOW the 'corrected' value before starting the calculation, so why wasn't it used to begin with? Or at least added to the table/query as an aliased constant. then you could just do an update query using the value in the record? Or an additional calculated field using the 'corrected' value.

MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
I am building a table that contains tolerances for part numbers for manufacturing. the part number consist of about 8 different sections, all making changes to the basic design tolerances in which I start with. All tolerance values are gathered by a process that queries and calculates the tolerances from about 40 different tables and then I need to go through every section within the part number and query about anthoer 20-30 tables to determine which of the basic tolerances get changed.

The way I do this is to Dim one variable for each tolerance needed and assign the correct value to it thru the process and then write a record to the table using these values.

Part of the process is to be able to have manual over rides for the end user to be able to reduce or expand any tolerance by a certain value. I was intending on doing this via a form the would allow them to enter the tolerance symbol and the value to reduce or expand by.

I would like to make part of the process to take any of the entries made into this table and adjust the corresponding symbol (variable) by the value entered by the end user.
 
From this description, I would think a simple combo box listing the varior parts and their corresponding tolerances could be used to make a 'selection'. This selection could be used to instantiate a dialog box showintg the Part, the tolerance - as it is and prompting for the adjustment. After the adjustment is entered, a simple update query would change the value. Is this a 'reasonable' direction?

You could include validation criteria within the process, to limit the change and / or absoloute value of the updated tolerance. If it were me, I would maintain the original tolerance and NOT allow it to be adjusted. Add a field to the final table "CalcTol" and not show it to the (potential)
modifiers.

MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top