home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Access saving value of one field to mutiple tables

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2267
Discussions: 200,970, Posts: 2,379,742, Members: 246,335
Old April 3rd, 2003, 06:24 PM   Digg it!   #1 (permalink)
Member
 
Join Date: Nov 2001
Posts: 177
Access saving value of one field to mutiple tables

Ok, my explanation on this one is probably going to be as miserable as all of my others, but here goes...

I have two tables, one table (current) and one (history). As you can guess the current table holds current values, values generated for this month and the history table holds values for all months past (up to 7 years). What I'd like to be able to do is have one control on my data entry form store it's value to the current table (OnLostFocus) and then when a button is clicked, also store that same value in the history table. Catch is, the past values in the history table can't be overwritten, so a new record will be created each time the button is clicked. The keys for the history table are an account name and the date, so ideally I'd like a new record for a new date.

Ok, now to try and clear up all the crap I just spewed out...

The end user types the values into the data entry form, as usual with Access, when they leave that control, the value is update automatically to the recordsource that the control is bound to in the "current" table. A button on that same form will be used to save those values to the "history" table, creating a new record for those values every time the button is pressed.

Anyone have any ideas on how I could do this? I already have everything set up and working with the current table, just need to figure out away to work the history table into it. I'm a beginner at Access, and a nothing at VBA, but if anyone has any suggestions, and can just give a shove in those directions, I'd love to muck around and try and figure it out. So far I've been using VBA to duplicate thos values in a seperate form and then link the controls in that form to the history table, but they aren't creating new records, as I'm sure all of you who know what you're doing have guessed. It's probably best accomplished with just straight VBA right?
Turnip12 is offline   Reply With Quote
Old April 12th, 2003, 05:38 AM     #2 (permalink)
Not Really a Member
 
Join Date: Oct 2001
Posts: 25,397
Ok so basically when a user hits a button you want it to post the same info to current, and to history?

Easiest way is to put a button on the form, and on that click event put a ExecQuery (can't remember exact command) and call a Insert Query that requires parameters from the form, then after that completes also call an update query OR you canjust keep that linked.. up to you
__________________
Helicopters don't fly; they vibrate so much and make so much noise that the earth rejects them.
vass0922 is online now   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3045)
Breaking: San Diego ACORN Document .. (10)
The disrespect of Obama by Russian .. (47)
Delete an OS (15)
Nvidia GTX 260 problem (7)
Laptop with wireless problem. (12)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
windows vista security holes (17)
Regular Build (11)
Internet Lost (5)
windows 7 problem (7)
Is the PSU I received dead? (14)
Point and Shoot Camera Suggestions. (6)
Recent Discussions
Is the PSU I received dead? (14)
Can't open Word (12)
Nvidia GTX 260 problem (7)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (37)
Delete an OS (15)
Steam ID's, Gamertags etc... (4)
Games, Cables, PCI cards, and more fo.. (6)
Dept. of HS: NSA 'Helped' Develop Vis.. (17)
Linksys WMP54GS wireless card problem.. (5)
windows vista security holes (17)
Help getting around port 80 for camer.. (5)
Skillsoft Network+ Study Software Que.. (10)
Browsers wont load websites (3)
help me pls laptop just stopped worki.. (0)
Open With ..... Win7 (3)
Laptop with wireless problem. (12)
Internet Lost (5)
virus blocking exe. files (1)
Point and Shoot Camera Suggestions. (6)
CPU fan stops spinning randomly (11)
Modern Warfare 2: Who Bought It? (65)
Print spooler problem (16)
Kingston Bluetooth Dongle Driver (1)
Multiple Restarts Required at Boot (3)
webcam (0)


All times are GMT -4. The time now is 08:45 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28