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

Temporary field in a query

Status
Not open for further replies.

rafe

Technical User
Aug 18, 2000
194
US
I'm trying to create a updatable field in a query "on the fly." Something that I can change in a form & the data will be unique to each instance of the form (like a yes/no flag) but not actually stored in the underlying table. am i missing the obvious? is this doable? are there reasons for not even trying?
 
Well, "IT" is certainly doable. You need to instantiate a querfdef object. Once instantiated, You construct the SQL string for the information/calcualtion(s) desired in the output. Finally, generate a recordset based on the querydef.

As they say - "Boom! Done!

Having said all that, the reasons for " ... not even trying?" may be equally compellling.

If you can calculate "It" from the information available to the form, why go to the extreme of constructing a quey when the same "Function" could be done in the form events?




MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over
 
Thank you Michael,

I'll look into the above the the "Boom Done!" & learn, as some of that was over my head...but i got jump in to learn.

As to why? The Form is continuous & fed by a query. I'm trying to select individual records on that continuous form for further processing by clicking a yes/no box. The ***really bad design*** i had before was to have a yes/no field in the table that got updated via the form. Problem if i try & muti-task on the same table. & an unattached control will change every record upon a click.

there are other instances of why i want to do this but the above is the clearest.

i'm no expert & am open to better design ideas

thanks again.
 
oops! that unattached control doesn't update ANY records

BTW: i'm serious about being open to design ideas
 
I'm going to go to a list box control instead. The effort is not worth the result.

Now to figure out how to format a multi-column list box or maybe just build the string up directly. All coumns are always left-justifiedB-(

Thanks anyway!

Access "odo et amo" :p

rafe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top