473,505 Members | 14,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Writing to variable tables - Access 2003

5 New Member
I am trying to write to different tables depending on a user selected variable (ie: depending on the year selected, the data would goto the correct table). Am I able to setup my fields in my forms to reference a predefined variable, then from there write the data to the correct table? Any help or suggestions would be greatly appreciated.
Sep 6 '07 #1
2 1369
FishVal
2,653 Recognized Expert Specialist
I am trying to write to different tables depending on a user selected variable (ie: depending on the year selected, the data would goto the correct table). Am I able to setup my fields in my forms to reference a predefined variable, then from there write the data to the correct table? Any help or suggestions would be greatly appreciated.
Hi, there.

If the tables have the same structure you may simply change Form.RecordSource after user has entered a year in let us say [ctlYear] control.

example, supposed tables are named: tblYear2001, tblYear2002 etc

Expand|Select|Wrap|Line Numbers
  1. Private Sub ctlYear_AfterUpdate()
  2.     Me.RecordSource = "tblYear" & ctlYear
  3. End Sub
  4.  
Sep 6 '07 #2
silverstriip
5 New Member
dave,
thanks i'm playing around w/ that right now trying to get it to work for me. this doesnt really apply to your msg, but i thought i would post it since it gives a little more detail:
this is for a database i'm using for a golf outing. i have a table w/ static information (all participant data), then 2 tables set up w/ data that is specific to the year that are linked to the participants (sponsorships and donations). i need a way to have the sponsorship and donations be year specific. whereas the participant database will just keep growing and getting updated w/ any new info.

Hi, there.

If the tables have the same structure you may simply change Form.RecordSource after user has entered a year in let us say [ctlYear] control.

example, supposed tables are named: tblYear2001, tblYear2002 etc

Expand|Select|Wrap|Line Numbers
  1. Private Sub ctlYear_AfterUpdate()
  2.     Me.RecordSource = "tblYear" & ctlYear
  3. End Sub
  4.  
Sep 6 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2603
by: Bennett Haselton | last post by:
I want to get an ASP.Net hosting account with my ISP, and I'm trying to find out what level of access to the server is requried in order for me to view the server in Server Explorer in Visual...
6
6749
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
2
9424
by: Bruce | last post by:
Greetings! After finally figuring out that the Linked Table manager is no longer an add-in in Access 2003 I now discover that it does not display any of my linked tables in the 'select linked...
5
2405
by: DFS | last post by:
Situation: Access 2003 front-end, containing links to Access 2003, SQL Server 2000, and DB2 tables. None of these tables are local. Hardware: IBM ThinkCentre, 10/100 Ethernet LAN Problem:...
7
11817
by: Joe | last post by:
I am using Access 2003 and are linking to an Oracle 9i ODBC datasource (using Oracle ODBC drivers). After linking the tables in Access, I inspect the data contained in the linked tables. For...
1
3859
by: Jerome Ranch | last post by:
I consider myself an Excel PT wizard of sorts, but now I have a situation with so much infromationthat I need to categorize and summarize, that I will use access to manage it. Interestingly,...
10
6706
by: Robert | last post by:
How do you get an accurate count of the number of records returned from a query when using linked tables. I have an access 2003 database as a front end to another access 2003 database that...
4
1914
by: sparks | last post by:
We have a new project here, one that I have never tried maybe its easy I don't know yet. We have people that have records dating back over 5 yrs on a sql server. We have to build an access 2003...
8
3028
by: Neil | last post by:
I just started using Access 2003, and I can't link a SQL Server table. I right-click on the database window; select Link Tables; and select ODBC Databases from the Files of Type dropdown. As soon...
0
7216
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7303
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7018
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5613
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5028
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4699
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
407
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.