473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

same form uses different datasets

I'm looking for vba code to enable within MS Access to have the same form to use different datasets. The requirement is to allow the user to switch between one month to another looking at the same form. The datasets are going to be stored within Access by month. Each passing month will get a new dataset stored to the database. The user while in the form will need to be able to view any month they select.
May 13 '10 #1
2 2003
Delerna
1,134 Expert 1GB
You don't really need VBA to do that

However

in the appropriate event
Expand|Select|Wrap|Line Numbers
  1. me.recordsource="Select theFieldList from theTable where month=selectedmonth"
  2. me.requery
  3. me.refresh
  4.  
You probably don't need to me.requery
I put it there to cover all bases

You will need to provide
theFieldList
and theTable
and selectedmonth

according to your needs
May 14 '10 #2
NeoPa
32,556 Expert Mod 16PB
Storing separate months in separate datasets (I presume you mean tables) is not a good idea (See Normalisation and Table structures).

The way this should be handled is by applying a simple filter to the opening of the form. Changing the filter can be done in VBA while the form is still open if required. Otherwise, a differnt call to open the form just passes the required filter.
May 14 '10 #3

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

Similar topics

0
by: Christian Marko | last post by:
Hi to all! As I read in the bug report on the Sun website, the bug, that java and javaw uses different default locales should be fixed with 1.4.2, but I use 1.4.2_04 and this bug still occurs. ...
1
by: Chuck | last post by:
I appreciate any help!!! I have an application that has 4 different forms that display the same information except for the fact that they are fed from 4 different parameter queries. The 4...
0
by: T. Hristov | last post by:
Hello, in my C# project I want to have one and the same windows form under different build configuration with some little changes(in order to have two versions of the same product). Is this...
1
by: bitwxtadpl | last post by:
-First I add and relate the tables A and B. Create a new instance of TableA Add TableA to DataSetX Create a new instance of TableB Add TableB to DataSetX Create a relation between TableA and...
3
by: TomH | last post by:
I am using VB within VS 2005. How can I have multiple datagridviews on the same form pulling from the same table? e.g. I want to see all clients from New York in one view and all clients from LA in...
1
by: ilucks | last post by:
I have DB(Access 97) where multi- user work in a network. Today, I encountered this problem. Two users were in it and do edition and adding a new data on the same form at the same time. User...
5
by: BD | last post by:
I am coding with C# in Visual Studio 2005 for a database application residing on remote MS SQL Server 2005. What I want to do is open the same form but from 2 different places and only one...
0
by: Anni | last post by:
Hi, Can anyone please tell me how do I give same namespace for different infopath forms.? I have an XML formed by an infopath form, the XML is : <?mso-infoPathSolution...
4
by: needanswer | last post by:
Is possible to have different values of combobox on the multi same form? Actually I want to make a multi same form, but with one combobox to set the authority. When different persons to use this...
0
by: TBvbaprogrammer | last post by:
I'm looking for vba code to enable within MS Access to have the same form to use different datasets. The requirement is to allow the user to switch between one month to another looking at the same...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.