Processing A Single Query In Two Databases

Nov 7, 2006

I have two identical databases in MS Access. I have created a query in the first mdb file, which retrieves the matching records in two tables.

My problem is that i want to execute the same query created in the database1, on database2, without creating the query in the database2.

I think it is possible, but the query i was trying was not working file.

select * from db1.[Query1] in 'C:DBDB2.mdb'

where db1 is the name of the first database,
db2 is the name of the second database and
Query1 is the name of the query in the db1.

Thanks in advance for the help.

View Replies


ADVERTISEMENT

Modules & VBA :: Sending A Single Email To A Single Record In A Query

May 15, 2014

I am trying to create a form with a button attached to each record that would allow the user to click the button and it would automatically open outlook and fill in the TO:, SUBJECT: and BODY: fields. Here is the code that I currently have:

Code:
Private Sub Command33_Click()
Dim strEmail As String
Dim strMsg As String
Dim oLook As Object
Dim oMail As Object
Set oLook = CreateObject("Outlook.Application")
Set oMail = oLook.CreateItem(0)

[code]...

There are two issues I keep running into:

1. This code opens outlook and populates all of the fields but pastes the email incorrectly. Instead of pasting just the email (email@email.com) it pastes the html tags as well (email@email.com#mailto:email@email.com#) which means that the user would have to delete everything between the #'s in order to send the email every time.

2. I currently have the email BODY pulling from a table but this obviously limits what I can do. I would like to simply encode the BODY within the VBA code. The setup I am looking for is:
one paragraph
a blank line
a hyperlink to a website
a blank line
another paragraph

View 9 Replies View Related

Payment Processing ERD Help

Nov 21, 2005

Hello,I'm designing a contract and payment processing database for a friends construction company. I've made an attempt at designing the data model, but wondered if anyone out there had ever come accross a similar scenario and could be of any help. I have attached a copy of my initial ERD.Entitys are as follows:CompanyHolds details of the company that are operating the system.CustomerBilling details for the customer.SiteA customer has many different sites at which work is undertaken.ContractA contract is created for all work undertaken at a customer site.PlotThe work a contract covers is carried out on various different plots at a customer site.StageWork is carried out in stages on a plot by plot basis. When a work stage is complete the stage can then be invoiced for payment.InvoiceOnce work stages are complete an invoice can be raised. An invoice can be for one or more stages (always under the same contract).Invoice_LineDetails of the different stages billed under a single invoice.PaymentStores detail of a customer payment.Payment_AllocationA single payment may be split accross multiple invoices. A single invoice may be paid through multiple payments.The main area I was hoping for help with is payment allocation, the requirements of which are listed below:1. When a payment is received it must be possible to split it accross multiple invoices (a payment will only ever be for invoices within a single contract).2. It must be possible for an invoice to be paid in part (i.e. be paid by mupltiple payments).3. If a payment isn't allocated in it's entirity, the the remainder should be put to a payment on account for allocation at a later date.4. An entire payment should be able to be put to a payment on account and then allocated later.5. It must be possible to enter credits against invoices.The reason I have Contract joined to Payment_Allocation is so that a payment on account can be created and linked back to the contract, for allocation at a later date. If a payment on account is stored as an entry in the payment_allocation table it will become difficult to then allocate the payment on account to invoices and keep an audit trail. The payment on account isn't really allocated until it is put against an invoice so I'm loathe to do it this way.On the other hand if I store the payment on account in the payment table (until allocated) it may make it harder for me to produce my statement report.I'm also having difficulty seeing how I can build a statement of account from these two tables...do I need to build up a transaction table in order to do this effectively? Or a temporary table of transations to base my report on?Any advise or pointers would be very helpful.Thanks in advance for your time.webbmatt

View 1 Replies View Related

Form Pre-processing

Dec 11, 2006

Hi
I have some code in a function that I want to run BEFORE a form (FormB) is displayed to the user.
FormB is called up by clicking on a button from another form (FormA), but when I display the ActiveForm . . .
Dim MyFormPO As Form
Set MyFormPO = Screen.ActiveForm
MsgBox "here!!-" & MyFormPO.Name
. . . I get the form name of FormA, and it errors-out because the objects I'm trying to reference do NOT exist in the Active form.
I've tried calling the function from every Form event ("OnOpen", "onLoad", "OnActivate" etc,,) but ActiveForm always seems to be the first form.
Anyone any ideas, please
Thanks
ajm

View 1 Replies View Related

How To Delay The Processing For Seconds

Aug 1, 2007

Is there any function to delay the system processing for a number of seconds.

For the time being I am do it indirectly by using loops, however, it is un proper way, as it is not scalable.

Also I dont want to use the timer control.

Thanks,

View 4 Replies View Related

Credit Card Processing

Apr 18, 2005

Does anyone know of any software or have any code that would allow to process credit cards.

View 4 Replies View Related

Query From 2 Different Databases

May 20, 2005

I have 2 different databases. One for Archives and one for active claims. Both databases have identical tables. I'd like to create a query that will pull information from both databases. I'm pretty sure that I can do this with a union query, but I'm a complete noob with sql.

Can someone give me an example of the sql code to use to pull information from tables on both databases?

View 3 Replies View Related

Order Processing & Warehouse Management

Sep 3, 2007

Hi all. I am considering developing a purchase order and warehouse management database, to be manage a cold store in my workplace.

What i have in mind is a system where the details of each pallet coming in is recorded (weight, quantity, location of pallet in warehouse etc.) is recorded, marked off against the corresponding purchase order number and then a label is printed with a barcode to quickly identify that pallet.

Handheld barcode scanners would be used to record when a pallet leaves the warhouse, and where its going to(despatch, production etc.). Ideally the scanners could be used to give forklift drivers order picking info aswell.

I'm fairly confident i can design the database, however, i have never done anything with barcodes, scanners or handheld devices. Is this even feasible with access? How do i go about doing it, any advice, example databases etc. greatly appreciated.

View 1 Replies View Related

Tables :: Processing All Records In Table

Dec 5, 2013

I'm working on a system for recording employee information, leave details, etc. I need to run a monthly update to increment each employees leave balance.

The two tables now in question are;

Employees - relevant fields are EmployeeID (key), Active (Boolean) and Leave (Numeric) [annual leave entitlement - eg 15 days]

The second table is LeaveTrans; Emprec, LDate, LType, PrevBal, ThisLeave, NewBal, Comments.

What I need to achieve;

For each "Active" record in the employee table, detirmine the monthly leave entitlement ("Leave" /12 - no problem here).

Append a new record to the LeaveTrans table with;

Emprec, LDate (Date of the update), LType (="Monthly allocation"), PrevBal (The NewBal from the last record in the table for this employee), ThisLeave (monthly allocation) and NewBal (PrevBal + ThisLeave)

I will need to access the last record for this employee to get the previous NewBal, before appending the new record.

The problem I'm having is appending to the LeaveTrans table, and then moving on to the next record in the Employee table, to repeat the process.

View 4 Replies View Related

Update Query Between 2 Databases

Aug 20, 2007

Hi
I have a problem with Update Query, I have 2 DB's and need to update a table held in DB#1 into a table in DB#2. I have read quite alot of post's about this but nothing is giving me the correct answer. I tried using Append Query but this was no good because when i ran the query it just adds the extra entries, I want the query to Update the entries already in DB#1. I also tried Update Query but didn't get the option to choose another DB.

Could anyone please tell me the best way to extract the data from tblInstruments(DB#2) and update tblInstruments(DB#1) i.e. overwrite the original field entries.

Many thanks.:confused::confused::confused:

View 12 Replies View Related

Query To Merge Two Databases Into One

Nov 21, 2007

Dear all
I need to merge a number of databases of the same type into one database in access. can you please help me with code itself.
thanks.

Ampah

View 2 Replies View Related

Query Won't Run Off Of Identical Databases

Sep 23, 2004

I have a query that is based on two other queries (they feed a larger query that a report uses). They are all select queries, no make-table, etc.

The query runs fine against the production oracle database. However when the query is run off of either of the two identical test databases (production was dumped into test within the last week), the query stops with an error of Invalid Operation.

The Help Screen (see below) doesn't seem to apply to anything this query is doing. Any thoughts?

Invalid operation. (Error 3219)
Possible causes:

You tried to write to a read-only property. See the Help topic for the property to determine whether it is read/write.
You tried to use a method or property on a type of Recordset object that the method or property does not apply to. See the Recordset object summary topic to determine which methods and properties apply to a given type of Recordset object.
You tried to append a property to a Properties collection of an object that does not support user-defined properties.
You tried to use the Update method on a read-only Recordset object.

Thanks,
B

View 2 Replies View Related

Create Query Over 2 Databases

Feb 15, 2007

Hi all,

Is it possible to create a query that looks over two different databases for information. i.e I have two departments at work that have seperate databases and I need to be able to search for data in both of them on the same query.

Any help would be greatly appreciated.

View 1 Replies View Related

A Solution To Manually Processing 'Entry Forms'

Mar 2, 2007

Hi Guys,

I've been pondering over a problem for a couple of weeks now - We receive around 1000 paper entries to our competition, and these all need manually entered into the access database in a one-er.

Is anyone aware of any ideas of how this could be made easier, and more automated?

Thanks.

View 3 Replies View Related

Modules & VBA :: How To Read TXT File Into Array For Processing

Oct 23, 2014

I'm getting an error when trying to read a .txt file into an array for processing. The error and a snippet of the code are below.

Run-time error '9'
Subscript out of range

Dim iFileNum As String
Dim strLineInfo()
Dim i As Integer
Dim strExpensesFile As String
strExpensesFile = "c:FinanceExpensesIn.Txt"

[Code] .....

View 9 Replies View Related

Queries :: Return Info To Table After Processing

Nov 21, 2014

I have a table (tblInstallations) which has records of date installed (for machines).

It is calculating that "next due maintenance" is one year after installation.

Sometimes we need to visit the site to maintain or service the machine before/after the specified date in "next due maintenance" and we need this to be calculated to reflect a year after date of visit.

I have a table called "tblMaintenance" which takes information about the machine an engineer is visiting from where originally the information are kept and that is in "tblInstallations".

How can I link the new date of the visit to update the record for "next due maintenance"...

View 4 Replies View Related

Modules & VBA :: Cannot Complete Action Whilst Processing

Jan 16, 2014

I'm trying to setup a process of opening a form, saving to a location, emailing it as a PDF, killing the PDF, move onto the next form - rinse wash repeat until done.The below works fine on a single click, however if I try to set it as an event timer of loop, I get an error saying: This action cannot be carried out whilst processing a form or report event.

Do
Dim outputFileName, Ref As String
Ref = Vici_URN
outputFileName = CurrentProject.Path & "Claim PackagesCICA" & Ref & " - " & Format(Date, "yyyyMMdd") & ".pdf"

[code]..

View 1 Replies View Related

Reports :: Importing And Processing Excel File For Report

Mar 26, 2013

I have an excel file that I need to prepare to create a report.It would be great if I could do this with Access 2003. This would mean that I need to import the excel file and create a table to handle this.Is there by any chance that I don't need to create a table and I can process the excel file? Or maybe automate the import of the excel file into table and only use a few of the columns so later I can create the report in access.Also what I need to do is add some columns with text in it (a standard text) that needs to add a day taken form the column to the right.

I simply would like to avoid to create a table from the import as this would make me end with a lot of tables (or mabye option to delete the table after finishing producing the report.

View 1 Replies View Related

Reports :: Adding Page Numbers Adds Processing Time

May 15, 2013

I'm working on a pretty serious report (at least for me)...I have 3 sub-reports inside, and the point of this is to use VBA and loop through several conditions (in the underlying queries), and print out in a batch for the user. When I add a page number footer it adds about 3 seconds to the processing time for a 14 page report. That doesn't sound like a whole lot, but when I loop through and process this 12 times, that's a lot of added time for the user...(the last thing I want to hear is it's slow!)

So, would it be faster if I set the page numbers in VBA? What event would I use? On Load?!? Also, how would I find the page number variables in VBA?

View 1 Replies View Related

Modules & VBA :: Storing A Single Record In A Single Dimension Array?

Sep 8, 2014

Any Single line of code available?

View 2 Replies View Related

General :: Sending Form Through Email And Processing Responses - Access 2010

Oct 16, 2012

I'm working on a vacation/time off tracker and was hoping to use the collect data feature. I've created a form where a user submits their requested date and number of hours, at which point I'd like the form to be sent to their manager for approval. The manager's email address is stored in a table. Once the manager marks yes or no, I'd like that reflected in the time off requests table, and an email sent to the requester letting them know if it was approved or not. Is this possible? How would I go about it. I'm pretty new to Access, learning on the fly, but I'm pretty good at modifying code to match my situation/working backwards if you have any examples for me to look at.

View 1 Replies View Related

Max Value For A Single Date/multiple Time/single Tag ID Combination

Oct 18, 2007

Hi, thanks in advance for any help you can offer. I've got a table that has

Date
Time
Tag ID
Power Level

throughout the day a computer listens to several tags (transmitters) and records the power level of the signal generated by the tag each 3 seconds. What I'd like to do is build a query that gives the Date, Time and Maximum Power level reading for each tag ID. I only want 1 record per tag per day

I've tried using "group by" and max in the query but this gives me all the times throughout the day.

anyway, thanks again for looking

cheers, Shaun

View 2 Replies View Related

Query In Forms Question (printing A Single Selected Query Record From A Form?)

Oct 19, 2004

What is the best way to impliment a query in a form so that the user can view the query records, and have the option to print or save the selected record using command buttons?

I tried subforms but I could not get the command buttons to work in the subform after it went into the form, it wanted to print the entire form instead of the selected record from the subform.

So in a nutshell I have 3-4 queries that are built, and I want to have them show up on my form in a format that the user can scroll through the results and select a single record of the results and then print or save that individual record from the form, if such a thing is possible.

Thanks in advance

Todd

View 1 Replies View Related

Compiling Multi Step Query Into Single Query

Dec 8, 2011

I'm new to access, and have discovered its easy to write large queries by breaking them up into smaller queries and having each subsequent query reference the one before it. My problem now is that I want to combine these queries into a single query, so as to make it easier for anyone who comes after me to edit/understand what was done. I can't seem to find a good explanation of how to do this, but it seems like there should be a way.

View 1 Replies View Related

Single Result Query

Mar 1, 2006

Hi

I am new to VBA with access. Im wanting to get the result of a query called "qLastRotaDate" into a variable called "datLastRota". The query returns a single date, it is not possible to have more than one result for this query. I have tried different variations of : datLastRota = qLastRotaDate but cannot get any to work. I'm assuming this is very simple yet I cannot figure it out as am very new to VBA.

Any help would be greatly appreciated. Sorry if this has been dealt with in previous posts but I could not find any info by searching the post.

Thanks
Mikee

View 3 Replies View Related

Return Max / Min Value In Single Query?

Oct 23, 2011

I have a table listing employee names and their birthdates. I have to create a single query that returns the names of the oldest employee and youngest employee. it's easy to return only their birthdays, but i can't figure out how to return the names (with or without their birthday). I can only use a single query.

View 2 Replies View Related







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