473,602 Members | 2,811 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to bring up a list of tables in form view containing the word "backup"

23 New Member
Well, I think I've described what I want to do in the title here.

In the database, I have two main tables that contain the main data for the database. One for group expenditures, another for application details. I have a query for each of them to copy all the contents of the table into a new table, then delete all the data from the main table. I need to do this becasue once a year the data needs to be removed, ready for putting in new data. I couldn't just delete it without backing it up, just incase we need to look at the old data later. The database is all user-proofed, so a user doesn't have access to menus or the database window - so users don't have access to these backup tables.

Basically, I want to be able to have some sort of query or something to bring up a list of all the tables containing the word "backup", becasue at the moment the only way to access the backups is to open the database in design view - which is ok for me, but I can't have other users doing this. I can't just link to the tables through a form, because we don't know the names of the forms (not the full name anyway, there will be new ones added later. Under the format of "AppBackup__dd_ mm_yyyy" and "ExpBackup__dd_ mm_yyyy". I just want to be able to open a form, show a list of tables containing the word "backup", then from the list be able to click a button to show that table's contents (preferably in a form).

Sorry about this. Don't know if anybody can help. I could just have all the backup data in one table, then rather than adding a new table each time we backup, it just appends to the table. but after a while, this table could get huge, plus it then won't clearly show which data corresponds to what year. I'll do the append thing as a last resort if I have to, that's easy to do. but preferably I would like to do what I've asked here, to bring up a list (in form view) of all tables containing the word "backup", then to click one to show that table's contents.

Thanks in advance if anybody can help, and even if you can't, thanks for reading.
Jun 9 '07 #1
3 3164
missinglinq
3,532 Recognized Expert Specialist
This will do the job!

Expand|Select|Wrap|Line Numbers
  1.   On your form place a Combobox
  2.  When the Combobox Wizard comes up click on Cancel
  3.  Goto the Combobox Properties >> Data 
  4.  Row SourceType = Table/Query
  5. Row Source = SELECT [Name] FROM MSysObjects WHERE [Name] Like '*backup*' AND [Name] Not Like 'MSys*' AND [Type]=1; 
Now in the VBE (code window)
Expand|Select|Wrap|Line Numbers
  1. Private Sub YourComboBox_AfterUpdate()
  2.     DoCmd.OpenTable YourComboBox
  3.  End Sub
This will only bring up tables that have "backup" somewhere in their names.

Good Luck!
Jun 9 '07 #2
Robertf987
23 New Member
Fantastic, thank you very much, it works great. Can't thank you enough. A cookie for thee shall be thy reward. Thank you.
Jun 11 '07 #3
missinglinq
3,532 Recognized Expert Specialist
Glad we could help you!
Jun 12 '07 #4

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

Similar topics

3
4688
by: 21novembre | last post by:
Hi all, I made a question several days before to describe my strange trouble of mysqldump. But I still can't figour it out. Well, I just want to ask another question whether I could just backup my databases by copying the data folder to some place? Then if I meet some disaster, could I just copy the backup folder back to recover my databases? Thank you. Zh.y
4
14387
by: mairhtin o'feannag | last post by:
Hello, I have a tablespace striped across three drives, call them 1,2,3, just to be clever. :) I allocated a lot more space (DMS) than I should have, since I didn't know a way to estimate the space required (long story, but the original space was in one huge tablespace for all tables ((35 million row tables)) and I needed to segregate them out into separate tablespaces for backup and restore purposes. So I allocated, like 4 million...
2
7235
by: devendra pardeshi | last post by:
hi friends/seniors i am stuck on one problem in VB 6.0 and need solution. see if u can help me. first i describe the problem. Can u imagin the WinZip scenario. we right click on some file and select in context menu add to zip.Now if winzip is not runnig allready new instance of winzip application begins and
9
9678
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a master-child link to the first subform. subform2 - Master Field: subTrainingModule.Form!TrainingModuleTopicSK Child Field: TrainingModuleTopicSK
3
2206
by: JamesB | last post by:
I have a config screen in my app that updates a dictionary<key,value>. I want to store a copy of this before going into the config screen so if the user wants to cancel all their changes I can simply set the working copies to be the backup. So, in my code, before the config screen is shown, I do this: Dictionary<string, myClassTempDic = MainDic;
6
1466
by: Deano | last post by:
Every once in a while I modify one particular form (could be anything from adding code to tweaking properties as far as I can see) and upon loading I get; "You can't assign a value to this object" The form is now completely blank and I can only see anything if I switch to design view. I am kaking changes that will break the form admittedly but those are bugs of course and I expect to be able to fix them.
25
20539
by: tekctrl | last post by:
Anyone: I have a simple MSAccess DB which was created from an old ASCII flatfile. It works fine except for something that just started happening. I'll enter info in a record, save the record, and try to move to another record and get an Access error "Record is too large". The record is only half filled, with many empty fields. If I remove the added data or delete some older data, then it saves ok and works fine again. Whenever I'm...
0
1634
by: myth0s | last post by:
Hi, The question: Is it possible to have two differents ActiveDirectory Membership Provider in web.config and change at run-time from the default provider to the second provider if the first one fail? Context: We are using the ActiveDirectory Membership Provider as part of our authentication solution. It is working great most of the time, but every now and then the AD process on the main server fail. With Windows this is not a...
0
7920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8401
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8404
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8268
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5440
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3944
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2418
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1254
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.