Big Ol' Access Problem (Forms, Macros, Importing, Query, Etc

Mar 31, 2008

Okay, so I just got a big project dumped into my lap to rebuild a database that was lost. This DB would import data from a couple excel spreadsheets and a text file, compare them to find any records that are missing from one or the other then spit that information back out in two reports. To make things harder, the person who uses this DB isn't the most computer literate and needs to be able to do everything with the push of a button. For this project I'm using Access 2003 with a possible need for 2000 backwards compatibility

First Issue: Importing. Is there ANY way to save an import so a macro could run it without the user doing anything? The other option is linked tables, but is there any way to update the data in those links because some of it needs to be changed. Also, can linking combine two excel spreadsheets into one linked table?

Second Issue: Information updating. As I mentioned before there is some information that needs to be updated before we can do comparisons. There is a field in both record sets that could be used for comparisons except for the fact it is formated all wrong.

In the excel spreadsheet it is set up as just a string of numbers like "3125" or "55879", but in the text file they added some preceding digits to this number code. The text file adds "HM" and a number of 0s to each number so that the field is a uniform 10 digits long. Like "3125" would become "HM00003125" and "55879" would be "HM00055879". So each record needs to have this data either added to it or trimmed off. The problem here is the variable number of 0s. I created a macro that would use the Len function to test how many zeros need to be added and update the field, but it can only run on one record at a time.

What I need to do is have either a trimming or adding updater for that field that runs in the background (either through the macro button or when loading a query) to make those fields compatible. It also would be preferable to work through linked tables.

Thankfully, there isn't any sort of rush on this paticular project. If you have any advice on any part of this project, please post

Thanks in advance

View Replies


ADVERTISEMENT

Query: Access Macros, Autodeleting Rows And Updating Table Names

Oct 11, 2007

I'm a bit in over my head. Unfamiliar with Access macros, I need to write a bunch of them for work, and soon. Unixen I can deal with, largely undocumented convoluted Access macros are something else....

My current problem is: I have a table. The first column has a value in it for almost every row. However, there are six other columns after it. I need to write a macro to automatically delete all of the rows that don't have data in the last six columns. Microsoft Help is, as always, of zero use. The FindRecord feature allows me to use expressions to search, but of course, the help fails to tell me what syntax Access uses.

Oh, and it asks me to select a table from the drop-down list. Can I use wildcards here? Is there a way to get it to automatically open the newest table, or will we have to change the macro accordingly each month?

Most tutorials/guides I'm Googling rather brilliantly repeat the same things the help does, AKA, are useless. (Why do they bother writing them if you're not giving new information...?)

I'd ask about the other various access questions I have, but I can pick them up as I go, this is the most pressing question.

View 2 Replies View Related

Help With Access Macros

Aug 18, 2004

I have a report that spans 4 years, and for each year it takes about 25 queries to produce the report. The queries for each year are only different in one number in the criteria, so what I'm trying to do, instead of having to manually copy and edit all of those queries every year, is make a macro that will do it instead.

I can make it copy all the queries and rename them, but I can't make them change the criteria in the queries.

View 3 Replies View Related

Access Macros

Mar 1, 2006

Hi there, forst post here so go easy.

What i need to do is copy the contents of certain fields in a subform onto empty fields on the primary form, can i do this, i gather it wold use a macro, but i checked no the list and i cant see anything wihch immediately jumps out at me as doing the job, any help

Thankyou, dragon2309

View 2 Replies View Related

Tables And Forms And Macros Oh My!

Jul 17, 2007

Hello everyone! I’m new at building databases; actually, I’m learning as I go as I’ve never had any formal training and this is my first significant attempt. So with that said, I’m hoping someone out there may be able to help me and I apologize in advance for how long this is. A little back round—I’m writing a database to create a report showing the loan history on an account—basically it shows how many loan payments came in with the dates they were processed and amounts of each payment. I created a table that is supposed to populate after entering the policy number, original loan amount and original loan date into a form. I have a macro that when a button is pushed on the form, should run a query (this query is made up of the table I created as well as tables from our data warehouse and when ran, gets the loan payments, dates processed, amounts, etc), opens a report in print preview (showing this loan info), and then deletes the record from the table that I created via a delete query (I do not want a history of each policy number that is entered into the form). Now to the issues—when I enter the info into the form, it does not automatically populate the table that I created, therefore the report does not show any loan data and obviously the delete query would not work. If I move to the next blank record, the table does populate with the info I just entered in the previous record, the report runs, but the delete query still does not work. I’m not understanding why my table won’t populate right away—the record source on the form is my table. I assume the delete query not working could have something to do with my macro? Here is how I have my macro set up:

Action: Echo Action Arguments: (Echo On) No (Status Bar Text) blank

Action: SelectObject Action Arguments: (Object Type) Query (Object Name) qryFormInfo (In Database Window) Yes

Action: OpenReport Action Arguments: (Report Name) rptFormInfo (View) Print Preview (Filter Name) blank (Where Condition) blank (Window Mode) Normal

Action: SelectObject Action Arguments: (Object Type) Query (Object Name) qryDeleteRecord (In Database Window) Yes

Action: Echo Action Arguments: (Echo On) Yes (Status Bar Text) blank

So if any of you made it this far, can anyone see anything obvious that I have wrong? Just a warning—I’m not good with VB code. I appreciate any input/suggestions you may have.

Thanks for your help!

View 1 Replies View Related

Modules & VBA :: Restrict Access For Those Without Macros Enabled

May 6, 2015

I created a database which when macros are enabled the only thing visible on the screen is the forum. All tables as well as the ribbon bar is disabled. I also disabled right-clicking.

My issue is, for those who do not have macro's enabled, it opens up in design view and allows access to the left-hand tables until the user clicks the trust button at the top. Once trust is clicked, everything hides as expected.Is there a way to restrict access if they do not have their macros enabled?

View 1 Replies View Related

Enable Macros In Access Via Registry Settings

Sep 22, 2011

I need to enable macros in MS Access.

I don't have Trust Center.

How can I do this via registry settings?

View 1 Replies View Related

Forms :: Importing Navigation Form Between Access 2003 Databases

Mar 31, 2015

When I import a form with the Navigation control on it The following attributes of the navigation buttons are changed to #FFFFFF:

Hover Color, Pressed Color, Hover Fore Color, Pressed Fore Color

I was hoping to be able to automate the updating of customers databases by sending them a database which would export the required objects rather than the whole front end database. I can think a way around this by including code in the form so that it changes the attributes to the desired values, which are:

Accent 1, Accent 1, Background 1 and Background 1. But I would rather not have to do that.

It is interesting to note that the Border Color attribute is not changed on importing.

View 1 Replies View Related

Queries :: Importing From Excel To Access Through A Query?

Nov 20, 2014

I need to import the data from an Excel spreadsheet but only certain cells. Is there any way I can call out a range of cells in a query and tell it what fields in a table to put those records in?

View 7 Replies View Related

Forms :: Access 2010 - Importing RECORD Consisting Of Fields Of XLS Data

Mar 12, 2014

I inherited a defective Access 2010 and am now attempting to import a RECORD consisting of fields of xls data.

I am attempting to import from an existing Form Datasheet so that it overwrites (or appends the new data to the datasheet) from another identical Form Datasheet because it contains an additional 1000 contacts in it.

I have resulted to Using an .mdb file from over a year ago because the current .mdb keeps hitting "The Microsoft Access database engine could not find the object (Error 3011)"

My initial opinion is that the more recent .mdb it is corrupt.

View 4 Replies View Related

Deleting Forms,queries,macros In Another Database

Feb 16, 2005

I have a list of objects (forms,queries,macros,reports the number varies but could be up to 100) that need to be deleted from several other databases (about 20).

I could do this by hand (go into each database and select and delete each object) but this is slow and error prone.

I could create a macro and import it into each database and then execute it (I know how to do this)

or (!!!!!!)

there should be some way to be in one database (HOME) and programatically (VBA) delete in the other database (OTHER).

I know how to

Dim db As Database
Set db = DBEngine.Workspaces(0).OpenDatabase("c:other.mdb")

What do I do next. I could use the db.execute command for tables (which I don't want to delete) but what about forms,queries,macros, and reports ???? I tried to modify the MsysObjects table but ran into permission problems.

Any Ideas

View 1 Replies View Related

Forms :: New Buttons Are All Suddenly Embedded Macros?

Feb 3, 2015

I've been developing a new db and have been adding buttons to forms all along without any issue.

I would create a button and under the event tab in the properties sheet all the buttons used to indicate "On Click" would produce an [Event Procedure]. Suddenly the "On Click" now indicates an [Embedded Macro] is going to run, which is not what I really want to have happen......

View 1 Replies View Related

Running Query With Macros

Dec 8, 2005

hi guys!

Is there a way to run a query with macros? I don't want to open it. I just want to run it, generate a report which will then be sent via email. How do I go about it?

Thx a mill!

cheers:D

View 1 Replies View Related

Running A Query Using Macros

Sep 23, 2004

I want to run a existing query residing in my Access database using macros (MS Access 97)
Can someone suggest me the steps to go ahead ?

View 11 Replies View Related

Importing From Notepad Into Access Table - Date Format Query

Jul 24, 2005

I am importing data that has been put onto Notepad into an Access table - this works fine except the date in notepad comes across as a date and a time. When I put the table into a query and ask for the date to be Between [Specify date 1] and [Specify date 2] - does the user have to then put 7/02/2005 00:00:00 AM and xxx. I have tried this but it doesn't return all values. I have also tried just the dates but this doesn't return all values either - any ideas?

View 6 Replies View Related

General :: Create Query Or Report With Macros Or VBA?

Mar 21, 2014

I want to create either a Macro or VBA that will automatically create a report or a query.

View 4 Replies View Related

General :: Way To Show All Database Elements Tables / Forms / Macros / Modules

Jun 7, 2013

I have a .mdb file (access 2003) which has ballooned in size to 1.2GB and I'm not sure why. I tried deleting some older tables (which were copies and had about 38,000 rows each) but it hasn't made a dent. Is there a way to show all the database elements tables, forms, macros, modules etc and list their sizes so I can see what has caused the size to increase?

There are 3 tables linked via ODBC which have tens of thousands of rows but as these are linked I wouldn't have thought they would have increased the size at all?

View 10 Replies View Related

Importing Excel To Access Keeping Relationships In Access Tables

Sep 13, 2007

I have a stock control database which i have nearly completed. This has Manufacturer, which is linked to products, which is linked to Sub Product(which also has field partCode). i.e. Manufacturer1 can have 3 products, and each of these products could have 5 subsystems and partcodes. Each partcode is unique to that subsystem/product/manufacturer.

I then have a pricing spreadsheet in excel, which has many tabs. A new column has been added for each item for Manufacturer,Product,Subsystem and Partcode.

I need to import these manufacturers,products,subsystems and partcodes, but into the tables with the correct relationships, i.e. product1 and product2 are products of manufacturer1 and so cannot come under manufacturer2, and so on.

I hope this makes sense, Thanks in advance for any help you can give!

Emily

View 14 Replies View Related

Importing Xls In Access

Dec 29, 2004

Hello,
I'm trying to import xls files in access, but it always gives a failure notice: .xls contains no object. What does this mean? Please help me - urgent!
Thanks.
please e-mail me (karolien.hellemans@leuven.be)

View 14 Replies View Related

Importing XML Into Access

May 22, 2006

Has anyone ever done an XML import into an Access database. Is it involved?? Can anyone give me some hints or tell me where to start?

View 1 Replies View Related

Importing WDB Into Access

Jan 22, 2014

So I have inherited 6 .WDB files that I need to get into my database and create some forms with. Problem is, I don't have MS Works to save as another file type. getting these .WDB databases into Access would be amazing!

View 2 Replies View Related

Advanced QBF And Importing Into Access

Dec 20, 2005

Hi everybody! :)

After a week of hair pulling problems with no solution, I've decided to ask my question here, knowing someone will be able to help me...

To the point:
I'm to use a QBF with more then one criteria,
(I'm using: like "*" & forms![f_name]![TB_first_name] & "*" or is null),
I'm having a problem with this because when I leave a text box blank, it retrieves everything (because is null = true), what I'm trying to say is: I have a QBF when using, lets say, 3 text boxes, unless I fill all of the text boxes with text, the query retrieves all of the records, can it be fixed ?
I've tried to use IIF but with no success... can anyone help ? :confused:

and another problem: while trying to import data which is not in English, from a Visual FoxPro data base to access, it turns out unreadable, what can I do to transform ASCII to ANSI or Unicode? :confused:

p.s. - Sorry for my English

TIA

WildCat

View 1 Replies View Related

Importing CSV Files Into Access

May 12, 2006

Hi, I’m trying to Import an external CSV file in to Access and then Update/Add the record into a table. I need to be able to do it using SQL and I’m not allowed to touch RecordSet!
Does anyone know How I could do this or where I would be able to find help on this.

Thanks

coops1204

View 1 Replies View Related

Importing Excel Into Access

Apr 4, 2007

Hi... i have a excel file..... from which i have imported records.... after importing.... the records sequence in my table has changed..... can anyone tell me how to preserve the sequence that i had in excel..........

View 3 Replies View Related

Importing Data Into Access

Aug 29, 2007

how to import text file row by row into access?

pls help me out......

View 1 Replies View Related

New To Access.. Importing And Using Question

Aug 23, 2005

Hello all, I am all new to access and I am trying to convert a program I made from excel VBA to ASP.net using access data bases. I am not even sure if this is possible, but I started looking into access couple of days ago, and reading examples of using it for websites etc. that I think it might have the potential.
My question is:
I have an excel file that has the following format:
months 1 2 3 4 5 6 7 8 9 10 11 12
Products

product1 20 5 9 8 etc
product2 9 6 7 3
product3 8 4 2 1
product4 100 26 78 32
.
.
.

Now the way I pull data out of this sheet of excel is if a user asks for the total number of products sold in february, the program will search for the month (2 in this case and that would be the fixed column) then it will add up all the entries in that column after row 1 (row one is the row that has the month numbers) and display the total (for this example it would be 41).

This is a real simplification of what is done but I think is brings out my question of how to build a data base for such data where I would need to make a 2 dimensional search, since from what I could not figure out how to incorperate my months into the data base in access when I tried to convert the file from excel to a database table in access.

I hope someone could help me. and I thank you all for you comments and replies in advance.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved