Queries :: Insert Data Into Backend Without Major Bloating
May 1, 2013
I need to know the best way to insert data into the backend without cause major bloating of the backend. I am currently inserting about 20k records at a time using an INSERT INTO statement. The backend went from 83mb to 511mb trying to insert the last 20k records.
Looking for the user to select a product name from a drop down box (not type in) when running query / report which will return details on only that product rather than all others in the query.
I have got major problems with the custom dialog boxes -- have got a table of product names, a query called current stock ( active products) . I can easily get a standard dialog box by putting [product code] in brackets in the query and this is not a problem. However in getting a custom dialog box I have had lots of problems.
Created a form called form999 which has product name field as a combo box and this has been named master1 . Clicking the form on it's own brings up the dialog box correctly and the drop down box selects the current products which is should do. However linking it to the query I have put [Forms]![form999]![master1] in the query and it will not link unfortunately and is driving me mad. Upon running the query it simply brings up the standard dialog box with [Forms]![form999]![master1] as the "enter parameter value. Understand code is required to get the OK and cancel macros working etc but when I click the query it should bring up the custom box which is the first stage and it is not ?? Any assistance would be greatly received.
Are there any sample DBs which have a field or related parameter as a customer dialog box -- have looked for examples without success.
I created an update query to a text field in a table. However, it inserts the data at the end of the string and I need to insert it at the beginning of the string that already exists. How do I move it to the front instead of the end?
I have just been working with some temporary recordsets in access 2000.
After working with the recrodsets each is closed and set to nothing but this leads to bloating of around 20Mb on a 70Mb backend database.
So I (in messing around) I added "DoEvents" after closing each temporary recordset and the bloating reduced to just 8Kb.
Is it normal practice to force the closure of temporary recordsets before moving to the next step using DoEvents, because this certainly seems to be suggested by this result?
I have a small (8MB) database that we use to monitor vehicle panels. The user enters a panel ID and it calls an image from a folder.
I have the paths stored in a table and use image1.picture = path
However, every time the user is calling a panel to see it, the database is increasing in size, by the size of the image file (300kb). So in 15 minutes the Db has grown from 8MB to 180MB.
I have two laptop computers. Both have Access 2010 installed. Both computers are on the same Workgroup and each computer can access files on the other. Computers are connected with wireless connection. Computer 1 holds the backend data while computer 2 is used for data entry and connects to backend on computer 1.Both computers are used for data entry, and as I said, data is stored on computer 1 only.
Here's the problem. If I enter data on computers 1 and then open computer 2 I cannot access the data unless computer 1 exits and then reopens. If computer 1 does not exit and reopen I cannot access the data from computer 2. In addition, if I enter data in Computer 2 and save it then computer 1 can see the data and all is well. So, for everything to work I have to start the data entry in computer 2. If I start data entry with computer 1 then I have to go through the save and shutdown process.
I have tried requery and refresh, refreshpage, refreshrecord, etc, but with no success.
I need to devise a query to append data for a particular Department_ID from TBL_NEWDATA to TBL_PERSON_ALLOCATIONS where that data does not already exist there. i.e. for Department_ID 'Research', I would want to append 'Person_ID', 'Department_ID' (in this case: 'Research') to TBL_PERSON_ALLOCATIONS for any tuples not already held.
INSERT INTO TBL_PERSON_ALLOCATIONS (Person_ID, Department_ID) SELECT Person_ID, Department_ID FROM TBL_NEWDATA WHERE TBL_NEWDATA.Department_ID='Form...'
[code]...
This Query takes a single argument from a control (Forms!Main!IN_Department), and this is the Department_ID to be updated.Is there any way to do this using a single query or will I have to use sub queries? I'd hoped not to as to keep the database as concise as possible.
Im totally new at all this stuff, so any help is appreciated.
i have a database with one table that has many different attributes and almost 3000 records. this is all i have done, i have simply been loading in all of the data to the table, now that that is done i need to allow users to extract the data.
so, what is the best way to build a front end that allows the user to easily extract data from the database? ideally, i would like to have some sort of front end that would have a text input window where they could search for records matching attributes in the table that match or are close to the text they type in, with some additional options for honing down the search terms with dropdown menus, radio buttons, etc.
the problem is i really havent a clue on how to do that stuff. can anyone just give some general, beginner type steps for things i should be doing to create that "front end" i am visualizing. THANKS!
I have searched the forum and have found a lot of information however I am not sure just exactly what I am looking for.
Here is my situation.
It is a spilt DB.
I have a database with a form and a subform. The Primary Key in the form is unique to company A ie ID=CompanyA-1, CompanyA-2, and so on. There is a one to many relationship to the subform.
I have three of these databases in use, all identical execpt the Primary Keys. one is CompanyA, the others are CompanyB and CompanyC.
At the end of the month I want all companies, A,B,&C to send me their Backends so I can bring them all together into one database. The master database I want to bring all three backends into has the same Front End as the other three databases.
My question is what is the best way to bring all of the data together in one database so I can use the common front end to view it.
I am assuming that since the PK for each database is different they should all cometogether without much of a problem? If I can figure out how to merge them.
I have a backend-database on a network disk shared by 6 users. All users have a frontend client wich they use to administer the datebase. Everything in the frontend looks ok and they can query the latest data. However if I open up the backend database tables nothing has been updated since the middle of december. If i make a copy of the backend I can open it up and create new posts with ID-numbers that has already been taken by the frontend.
Ofcourse I have doublechecked that the clients are connected to the right backend file (there's only on backend file in the directory).
i have my database split (backend and frontend) - both are residing on the server in different folders...users can't have it on their desktop since we're running on a Citrix server and each user only has a thin client.
Now currently I've got 3 users to the system. 2 users can use the system simultaneously without any problems...however the other user loads the front end but the backend data (bookings, despatches, etc) simply does not load - cannot access any data..
Platform: Windows XP - government network The government recently went through a migration of all networked directories to a central repository -- that was in June. I recently discovered that one of my database users, who happened to be working from home that past month, was not migrated properly.
Problem. The home user was still entering projects into the non-migrated location, while the users at the office, are entering data into the new location. Therefore major information is not showing up.
Need to urgently pull the project data into the current database.
But, I cannot simply import this data because it will wipe out the data I've entered into this table.
Any ideas would be greatly appreciated. Thanks in advance. Barb
Yesterday my database crashed. It is the 'DEV' version for my application - so all of the current fixes/changes are in there and I have forgotten to backup!
It crashes when ever I try to enter the VBA editor, or build code. This occurred after a minor problem running some code (I forget which code).
The same occurs when I try to get into the code builder in the repaired version access generates...I have also tried using compact & repair to get in - but still no joy.
Can anyone offer any advice workaround to get this up and running again?
I'm trying to write a database for work (accounting firm).
I would like to start out with about 5 tables.
1) Client Information: Would include name, phone, etc and a field that stated what kind of client (F/S or Tax).
2) F/S Tracking: Would include name and date in, date started,etc.
3) Tax Tracking: Would include name and date in, completed, submitted to gov.
4) Employees: the names of the firms employees.
5) Job Jar: Would include employee name, and which client(s) they should work on.
What I need help with is the data entry form for the Client information. I would like to have it so I only enter the Client Name once, and only once, and not only will it update the client name field in the Client Information table, but the corresponding field in the F/S Tracking table (if the client type in the Client information table = "F/S") and the Tax Tracking table (if the client type in the Client information table = "tax").
I have tried to use an update query that runs when the Client information form is closed but I think I might be doing it wrong, because I always get the message that 0 (ZERO) records will be updated.
I have a normalized DB with one to many relationships, using Primary and Foreign Keys.
I need to do inserts and maintain the PK/FK relationship, which means when I add a new PK I need to insert that PK as FK in other tables in the same transaction.
How do I do this in Access? SQL Server I use transactions, but I can't lock up the tables in Access like that.
I did a bunch of searching and found nothing, which leads me to believe I am way off in my thinking. Below are the dirty details
I have 2 tables, tblName and tblPhone. 1 name can have many phones.
tblName has PKName. tblPhone has PKPhone, FKName.
I have a form where user enters a new Name and PhoneNumber.
Name gets inserted to tblName, assigned with PKName = 100
Phone should get inserted into tblPhone with PKName.
IE Insert into tblPhone (FKName, PhoneNum) VALUES (100,"212-555-1212").
The dumb way I am doing it now is I insert to tblName, query tblname for the PK, then write to tblPhone. This can't be right.
I am trying to use SQL to run queries in our access database in order to (hopefully) speed things up. I'm trying to create code that basically takes data from one table and inserts it into another whilst doing calculations on the data.
However I can't get past this:
Code: Private Sub Test_Click() Dim strSQL As String
This is my problem!! I have created a Macro, using sendobject to send an email once the database has been opened. The email is to contain a copy of a report which i have specified in the macro.
On opening the database, a box appears with "Microsoft Office Outlook" on the top. The box says:
" A program is trying to automatically send email on your behalf. Do you want to allow this? If this is unexpected, it may be a virus and you should choose no."
Then there are three buttons with yes, no or cancel on the bottom.
First question is why is this appearing and is there a way around it, and secondly, when i click on yes, i dont recieve an email and no buttons appear on my switchboard!!!
I use MS Access a lot for my work but a few days ago when I opened Access it asked for a username and password. I didn't set anyway passwords so tried to log on using the username: admin and a blank password which didn't work. I have tried every username and password combination that I could have used but nothing seems to work.
Is there anyway for sorting this out so that I can use Access again?
In basic terms, the contract table has basic contract info, resources can be assigned to a contract (via the Assign table) and we feed in exchange rate info also from another table.
Everything is so slow as soon as I put the BE on a share drive. I have done everything I can think of, I have changed to tlookups, I have changed the Auto options as recommended, analyse shows no issues, compacted the DB. It is unusable!
I notice on one form that it takes 1 second to calculate a field. The field basically uses a tSum to find the total cost of a contract (looks up assign to sum up all the attached resources). This seems to slow it down, but it does not explain the huge time it takes to load up.
I am considering that the issue may be down to the share where it is being located has too high latency (it is in another country, and it feels slow browsing through it)
Any other general ideas, or do you need more info?
I have a problem with duplicate records in my query. I know why the duplicate records are occuring and I have spent a ridiculous amount of time trying to fix the problem, but I'm really at a lost and am quite desperate for some help.
Here's some background info that shows the cause of the problem: I have two tables. In the first table (tblMainData), there are three columns of interest (P1, P2, & P3). The second table (tblGroupList) has two columns (PN & GroupList). A relationship exists such that the data in "PN" is parital-text values of the data in columns "P1", "P2" and "P3".
For example, "P1" in tblMainData may contain "A1235XX". The "A1235" is what's important, so that's one of the values that I have in "PN".
Continuing, I have a user form that uses the "GroupList" field as the RowSource for one of my combo boxes (cboGroup), and this field contains an (ALL) option. So, when a value is selected from cboGroup, I use the following Criteria filter Like [PN] & "*" in my query (qryFilterGroup) to look for those partial text fields that match what's in fields P1, P2 and P3. The results are then shown in a subform.
Here-in, I believe, lies the source of the duplicate records. In my userform, if "(ALL)" is selected under the cboGroup combo box, a new record is created for each field P1, P2 and P3 in tblMainData that contains data and that is related to the partial text matching Criteria. A new field is created because each field corresponds to one of the values in the "GroupList" field.
This is really difficult to explain, and I don't really know if I should continue without writing a book. If someone or someone(s) could be so kind, please have a quick look at my attached database as it's obvious to see my problem. Any help is greatly appreciated!!
I recently found a need to pass a message on to everyone that opened a certain access database. So in I thought the easiest way of doing this would be to use the startup page & macro on the Northwinds Sample Database that comes with access.
However, I kept getting an error because the ok button was pointing the main switchboard which doesnt exist on my database, so I tried deleting the following to see if it would sort the problem: -
' Closes Startup form. ' Used in OnClick property of OK command button on Startup form. DoCmd.Close DoCmd.OpenForm ("Main Switchboard")
Now I think I've made things a whole lot worse. When I opne the database I get that first startup form and of course the button doesnt work and everything else is disabled.
I could really do with some help on this one.
Thanks,
Marc.
P.s. Cracking forum guys, if it weren't for places like this people like me would be in a whole world of ****!!