Store textbox value in to table

  • Thread starter Thread starter Futureline RoyAlty via AccessMonster.com
  • Start date Start date
F

Futureline RoyAlty via AccessMonster.com

Thanks for reading this.

I have made a very simple database to store some data about computer parts.
This is done by filling several textboxes. The last textbox is filled with a code that sums up all the textbox values in to ?Textbox30?.

(Control source) =[Pentium]+[CPU]+[Geheugen]+[HD]+[CD/DVD]+[NIC]+[SND]

Everything works fine. Now I want to store the generated value in to a table field in the database. The database is called ?Barcode_Totaal? and de field is ?Barcodesave?

What I want to do is save this value when I hit the save button this value is saved in this field.
I am completely stuck. Hope you can give me some hits or examples.

Roy
 
If you have already stored the values for all the fields you would use to
add together, you don't need to store their sum. Do the summing in a query,
so the ?[Control Source] will always be "fresh".

Otherwise, you'll need to both store it AND keep it and all the fields
synchronized, and recalculate the stored computed value every time any
component is edited. And don't even start on how you'd verify the component
values if the [Control Source] were edited!

--
Good luck

Jeff Boyce
<Access MVP>

Futureline RoyAlty via AccessMonster.com said:
Thanks for reading this.

I have made a very simple database to store some data about computer parts.
This is done by filling several textboxes. The last textbox is filled with
a code that sums up all the textbox values in to ?Textbox30?.
(Control source) =[Pentium]+[CPU]+[Geheugen]+[HD]+[CD/DVD]+[NIC]+[SND]

Everything works fine. Now I want to store the generated value in to a
table field in the database. The database is called ?Barcode_Totaal? and de
field is ?Barcodesave?
 
To be clear. The "(controlsource)" is set in the properties of the textbox. By adding the =[Pentium]+[CPU] the "textbox30" displays the values off the other textboxs i use to add all values together.
So i get a "textbox30" displaying "P3800mhz".

And to make it clear.
This textbox value is what i want to save in a field of a table called "barcodesave".
I found no other way to add all values together and get an instant refresch off "textbox30" as i change a value on the other textboxes.

The [Pentium]+[CPU]+[Geheugen]+[HD]+[CD/DVD]+[NIC]+[SND] are all combo boxes and are added together in "textbox30". There is no calculating or sum needed but it was the only way i knew.

(newbie) :-)
Maybe this clears it up what i want to do...???
 
Perhaps I still don't understand your situation, but if you can add those
together ANYWHERE, my suggestion was that you do it via a query, rather than
storing a value in a table (see previous response for rationale).

There would be no reason why you couldn't add an unbound textbox to your
form, and place the results of the query's calculation in that textbox,
along with all the bound fields displaying their values.

If you want an "instant refresh" on your form, write a simple routine that
adds the values and fills the textbox (and does whatever else). From each
control's AfterUpdate event, call that routine to refresh your (unbound)
textbox.

Or am I still missing the point...?

--
Good luck

Jeff Boyce
<Access MVP>

Futureline RoyAlty via AccessMonster.com said:
To be clear. The "(controlsource)" is set in the properties of the
textbox. By adding the =[Pentium]+[CPU] the "textbox30" displays the values
off the other textboxs i use to add all values together.
So i get a "textbox30" displaying "P3800mhz".

And to make it clear.
This textbox value is what i want to save in a field of a table called "barcodesave".
I found no other way to add all values together and get an instant
refresch off "textbox30" as i change a value on the other textboxes.
The [Pentium]+[CPU]+[Geheugen]+[HD]+[CD/DVD]+[NIC]+[SND] are all combo
boxes and are added together in "textbox30". There is no calculating or sum
needed but it was the only way i knew.
 
I am sorry to give you such a hard time. Maybe it easier if I let you see what I have done.

Http://www.futurelinepowercore.com/Barcode-Database.mdb
Here you can download the MDB I made. I am not so familiar with all the terms used in access. If you open de form you see a textbox called "Dynamishe Barcode" This value I want to store in a field "barcodesave" in the table "Barcode Totaal". Maybe if you look at it an see what i have made you understand it better. It?s me to blame for the crappy explanation. I am still learning here. :-(

P.S. Ignore the barcode wizzard DLL. It something i use to generate a barcode with later in the project. Thats why i need this value saved.
 
Thanks for the offer. Could you help me do a better job of helping you?
Take a look at my last response and post it back with your
comments/questions inserted. That way, what I've described poorly will have
your questions attached, and I can respond directly.

My "day job" doesn't really give me the time to investigate your database
and try to figure out what you really want it to do -- and I believe we can
resolve this via this newsgroup!

--
Good luck

Jeff Boyce
<Access MVP>

Futureline RoyAlty via AccessMonster.com said:
I am sorry to give you such a hard time. Maybe it easier if I let you see what I have done.

Http://www.futurelinepowercore.com/Barcode-Database.mdb
Here you can download the MDB I made. I am not so familiar with all the
terms used in access. If you open de form you see a textbox called
"Dynamishe Barcode" This value I want to store in a field "barcodesave" in
the table "Barcode Totaal". Maybe if you look at it an see what i have made
you understand it better. It?s me to blame for the crappy explanation. I am
still learning here. :-(
P.S. Ignore the barcode wizzard DLL. It something i use to generate a
barcode with later in the project. Thats why i need this value saved.
 
Back
Top