Access Query From SQL Database

Nov 26, 2012

I have an Access Database that queries TagNames from an SQL DB(dbo) and puts them in a new access table(Consolidate). The query adds a field(Time) which looks at the EventTime of the item in the SQL Database. As of now the query is a 12 hour query finding items that occurred in the SQL DB from the previous 12 hours, ie (Criteria: >Dateadd("h", -12, Now()).

I am trying to change from a 12 hour history to a dayshift and night shift query. This would be 6am-6pm and 6pm-6am. So, I am creating another field(Expr1) where, Expr1: IIf((DatePart("h",Now())>=0) And (DatePart("h",Now())<=6)DateAdd("d",-1,Now()),Day(Now())). The criteria is: >=TimeSerial(6,0,0) And <=TimeSerial(18,0,0) This query should cover the dayshifts history when the nightshift runs the query. If the system time is greater than midnight and less than 6am use the previous days criteria, else use todays criteria.

View Replies


ADVERTISEMENT

Queries :: Access Database - Query Based On Multiple Day / Date Criteria

Jul 26, 2015

I am currently working on a project to develop an access database to manage a roster of calls to clients on a daily basis based on two general criteria:

1. Pre-determined days selected by the client. (e.g. Call Mon, Wed, Fri only. This can change as client requirements change.)

2. Ad-hoc changes based on the client’s circumstances. (e.g. No call from 27/7/2015 to 29/7/ 2015)

I have managed to successfully deal with the second of these with the following expression in a query:

CallToday?: IIf((Date()>=[NoCallFrom] And Date()<=[NoCallTo]),"No","Yes")

However dealing with the first is a little more difficult to work out. I have tried a multivalue lookup field with multiple days selectable, but constructing an IIF query to deal with these multiple values is proving quite a challenge.

I am thinking of using a table with days of the week and a junction table to allow the multi-selection, but I may need constructing the relationships and the query here.

View 8 Replies View Related

Modules & VBA :: Microsoft Access Database Engine Cannot Find Input Table Or Query

Dec 3, 2013

I have an App that runs a few action queries using:

Code:
CurrentDb.Execute "[My Query Name]"

At some point I get this Error: The Microsoft Access database engine cannot find the input table or query <name>. Make sure it exists and that its name is spelled correctly. (Error 3078).The query is there, I can run it from the DB objects window.Queries run using CurrentDb.Execute earlier in the code.

View 3 Replies View Related

Best Way To Import SQL Database To Local Access Database?

Dec 25, 2005

I'm new to Access and VBA, for the record. What I need to do is copy a SQL database (table structures and records) and save it as a local Access database, so that the user can query and make any changes on the local file without editting the SQL database.

Looking around, it seems like the best option would be to use the TransferDatabase method with the acImport option. Does this sound reasonable, or can someone with more experience suggest a better way to go about it? Thanks.

View 3 Replies View Related

Database Size Limited To 2GB / Query Multiple Database Without Linking Tables?

Sep 7, 2011

I'm trying to set up a simple query that links four tables. However, the tables are extremely large, all in excess of 1.5GB each so I had to split the tables up into four separate DBs. I've tried the following with no success:

1) Link the 4 tables in the DB which contains my primary key. This quickly inflates increases the file size above 2GB and won't let me go any further.

2) Build a remote query to connect the four tables. This looked promising until I tried to run the query and it became evident that it only knows to point to the last database source that you specified.

I'm running everything locally on my C drive. The data source are simple text files (1.6 million rows) from the FDA website.

View 3 Replies View Related

How To Access Ms-Access WorkGroup Tables To Change Database Login Password

Apr 13, 2007

Hi!
This is Kishore, working on VB Project which is using MS-Access95 as backend.
Now, i want to change the Database login Password.
Could anyone guide me in this context.

Regards,
Kishore

View 4 Replies View Related

Using Access's User And Group Accounts Or Using A Login Form To Access Database?

Sep 9, 2005

Using Access's User and Group Accounts or Using a Login Form to access database?

I've been researching on how to make a database secure. How to create User and Group Accounts on access, I see the step by step instructions and tried it out myself.

I also saw some sites where they give an example of a Login Form and how to create one.

My question is do you need to create both. First create the users and groups to permit or deny access to certain forms and then have a login form?

But would that mean that they'd have to login twice? Once when the database opens because it activates the db security that was created and then login again in the login form that was created?

Also when the user logins in and clicks on the cmd button on the form which opens up another from, frmWorkLog, I have an Employee field. This field I want it to have the user's name entered automatically and "locked". So that info, employee name, is extracted from the user's login. So then the user can only see his or her records only and no one elses.

How would I go about creating that. Hope I made my explanation clear.

Thanks in advance.

View 3 Replies View Related

Locking User Access To Database Objects (MS Access 2000 And 2003)

Apr 15, 2007

I have two database applications and they are:
- the (A) application is for administration use.
- the (B) application is for normal users use.

the idea is that: I made the (A) application for administrators who have full control over the database objects (tables, forms, queries, and so on ...).

the (B) application I have created for normal users who will have only to use forms to insert some data and display data only.

but the two applications has a respective table called "vacation request" table. where I linked them, so the both administrators and users can share the data.

The real question is that: How can I prevent the users from seeing the database objects in their application. I used the database options which have helped me in hidding the database objectives when the users open the application, but unfortunately they managed to access to the database objects by pressing the special keys.

I would like to have an access to the (B) application when I want to make some modifications to the forms and then lock it from users where they only have to use the forms for requesting vacations and view the vacations.

View 1 Replies View Related

Modules & VBA :: Open Database / Run A Query / Close Database

Aug 22, 2014

i have a database that runs updates from within itself.what i need is, this database to then open a another database run a update query, then close it.

View 4 Replies View Related

Access 2000 Database Not Working Under Access 2003

Dec 7, 2005

i am trying to use access 2000 database onto to access 2003. When i try to click design mode to change something it gives me this message:

You dont have permissions to modify.

If i run it on access 2000 it runs fine.

Someone please help.

View 5 Replies View Related

Convert Access 2000 Database To Access 2003

Sep 27, 2006

Hi,

A few years ago I’ve made an access database on access 2000. The problem is that now I’ve installed the office 2003, and I can’t make the database work properly.

At first says that are missing those files: “tshoot.ocx”, “msioff9.ocx” and “msowc.dll”; so, I’ve copy them from another computer using office 2000 and now only complains about “msioff9.ocx” saying that my database contains a reference incomplete to it.

Is there no other way to convert my database do work properly with access 2003? What can I do?

Regards

View 2 Replies View Related

Access 2003 To Access 2007 Split Database

Mar 8, 2007

Hi All,

Background Info: I developed our main department's Access 2003 split database which is on a server for 15+ Users. I've now been given Access 2007 for development -- Users still have 2003. There are also 2 other smaller databases that are not split (.mdb).

Problem: In the split database, I've saved the Application .mdb as 2003, relinked and made a new .mde. But the Users still cannot open the database. (I did this in a copy until I figure out the nuances with 2007.) The 2 other unsplit databases can be saved as 2003 version and Users can open OK.

I'm grateful for any suggestions on working with Access 2007. I've been trying to tackle the ribbon which is a whole other question.

View 4 Replies View Related

Access 2003 Database Not Functioning In Access 2007

Mar 30, 2007

Hi

I have an Access 2000/2003 database which opens up and displays correctly in Access 2007, but when I go to use the File>Print command, or for that matter any of the other pull down menu's nothing happens?

Has anyone else experienced thisproblem, or does anyone know what I am doing wrong?

Any help greatly appreciated.

Thanks

Steve

View 1 Replies View Related

How To Gain Access To The Database From An Access Application?

Jan 10, 2007

Hi

I have this Access application. Now I want to see the databases and fields defined.but when I open the access file, it straight opens the access application.
Then when i press Alt+F11, it opens VB Editor. Then when I click on Design mode it comes back to access in the design mode, but still does not shows the design mode for databases and reports and all.

I can remember there is one more step I need to do after getting into the design of the form.But I cannot remember that

Could anyone please help me out

thanks
namit

View 1 Replies View Related

Remote Access To Access 2000 Database

Feb 20, 2008

Hi,

I am doing some computer work for a company that has an Access 2000 application. This app is split up between a program database that contains the forms, reports, etc. and a data database. Both the program database and the data database are located on a Windows 2003 teminal server. There are usually two or three remote users logged into the terminal server, but this number is about to increase to 6 or 7. I am concerned that these user's will all be running the same copy of the program database. I have read that this can lead to performance problems.

I was wondering if anyone hear thought either of the following would be an improvement:

1. Put a separate copy of the program database in each user's profile on the terminal server.

2. Rather than keeping the program database on the terminal server, put a copy of it on each of the remote client pc's. Then set up a VPN connection to the server and use this to link to the data database.

If anyone could tell me if either of these options would lead to improved performance, I would really appreciate it.

Thanks in advance,
Paul

View 2 Replies View Related

Access Database Without Opening Access First

Jul 20, 2007

I'm wondering if there is a way to open an access database (ive started with a microsoft template for an inventory management database) outside of the access environment. I'd like the program to run more like a .exe file rather than a database, but still having the links to and the functionality of the microsoft database

is this possible?

View 2 Replies View Related

UNION Query MS Jet Database Engine Cannot Find The Input Table Or Query.

Oct 28, 2005

Hello All,

I'm trying to run a UNION query that joins five queries through a MS WorkSpace into a DAO.recordset in VB. I'm pulling the data from a SQL Server Database through VB in Access. I'm attempting to open a recordset with a query passed to it as a string. The query is below. For some reason, I'm receiving a message: "MS Jet database engine cannot find the input table or query. Runtime Error 3078".

Here's what's puzzling. When I run a single query without any UNION statement, the code finds the table and runs fine without error, but anytime I join two or more queries with a UNION statement in the VB, it gives me the error.

I've executed the same UNION query in both Access Query Builder and SQL Server's Query Analyzer and they work fine in both environments. It's only when I call the query from a DAO.Recodset with VB that it causes this problem. The following is a sample of the UNION query joining two of the five queries. Does anyone have any idea what could be the problem? The following query executes in about 5 seconds so I don't think there's a "time-out" issue. I'm thinking that the UNION statement may be the culprit. Maybe there's another way to approach joining these separate queries? Any help would be most appreciated. Thanks.

SELECT SalespersonID, Sum([SlsPrice]-[RtnPrice]-[SlsDiscnt]+[RtnDiscnt]) AS fldPrice FROM MyTable WHERE (((Source)='d') AND ((DistrictID)='01') AND ((CategoryID) = 'HCPROD') AND ((BrandID)<>'CSS')) AND (((BrandID)<>'1356')) AND (((BrandID)<>'1400')) AND (((BrandID)<>'1551')) AND (((BrandID)<>'555')) AND (((BrandID)<>'66'))
AND (TransDate >= 07/01/2005) AND (TransDate <= 07/31/2005) GROUP BY SalespersonID
UNION
SELECT SalespersonID, Sum([SlsPrice]-[RtnPrice]-[SlsDiscnt]+[RtnDiscnt]) AS fldPrice FROM MyTable WHERE (((Source)='d') AND ((DistrictID)='01') AND ((ProductID) = '0029800')) AND (TransDate >= 07/01/2005) AND (TransDate <= 07/31/2005) GROUP BY SalespersonID

Set wrkJet = CreateWorkspace("", "pw", "", dbUseJet)
Set db = wrkJet.OpenDatabase("DW", _
dbDriverNoPrompt, True, _
"ODBC;DATABASE=DW;DSN=DW2")
'Set rs1 = db.OpenRecordset(strSQL)

View 9 Replies View Related

How To Run Database FE Without MS Access

May 9, 2005

I have written (what I think) is a great database, but when I came to install it I found out that the users I wrote it for did not even have MS access on their computers.
Is there a way that I can save the FE in a different format, or is there a tool, that they can use the FE without having to install Access?

This is the only database / Access they will use

View 2 Replies View Related

Access Database For PDA's

Aug 2, 2005

Has anyone here used Access on a PDA yet?

I'm looking into the possibilities of creating a db to be used on a PDA for people to instantly update records, and then possibly download the data onto a pc to update the main db.

Any suggestions?


thanks

View 3 Replies View Related

Access Database

Aug 14, 2006

We have this database which is used by a member of staff for some reason even though the system clock is at the correct time and all other office programs like word and excel save the file and show the correct time. when evre this user saves there database and goes to view the time its showing as being saved an 1 hr behind insted of at the correct time.

Has anyone ever heard of this before.

Phill

View 2 Replies View Related

Use Database Without MS Access

Sep 10, 2006

:confused: Can I make my Access database into an .exe file or something like that so anyone can use it w/o Access?

View 6 Replies View Related

Access Database????

Sep 26, 2006

hi,
can anyone help me i am trying to find a very competitive person, company who can deisgn my companies database for me.
i will behonest i have tried myslef and got stuck,therefore resorting to asking for help for someone to do it for me. lol

it will be a basic database,
all i need is the following:
Customer information.
Accounts(to keep track of payments etc)
orders
deliveries
expenses.
service records

and if possible be able to print off all worksheets etc from the database instead of having them stored elsewhere.


em

View 7 Replies View Related

Help With MS Access 97 Database

Jan 25, 2007

I'm new to this site. I have Access 97 Pro. I have a problem as cited below. I have 2 Access 97 tables called: Name and Activity. The fields in the Name table are: NameID (set to autonumber and primary key) and Name (set as Text). The fields in the Activity table are: ActID(set to autonumber), Activity(set as Text) and NameID(set as number). There is a one-to-many relationship between the tables. Name is the ONE and Activity is the MANY

Have a form and subform; Name is on the form and Activity is on the subform. The idea of this database is to link a name to various types of activities. Each name could have a multitude of activities. There are only about 25 names. I want to make the Name field a combo box so the user can pull down the menu and select a particular name. I also want the Activity field in the subform grid to be a combo box so various activities can be selected easily, probably in alphabetical order. There are some other fields in the grid: date of activity, staff, participated, etc. I'd even like the staff field to be a combo box so a staff name is easily entered (I'm probably wishing for the impossible). The problem I’m having is knowing how to link the two combo boxes so that when the user selects a name, any related activities show in the Activity field in the grid. If there are no activities related to a Name, then the user could pull down the menu and select an activity. Currently I have both the name field on the form and the activity field in the subform as a text boxes. I can enter names and activities and the particular name is connected to that persons unique activities. Using textboxes works fine. My wanting to use combo boxes is my attempt to make the database that much easier for the staff to use. Is there a way to do this? If not, I'll have to tell the staff that it can't or I don't know how to use the combo boxes and they will have to live with the way it is now. Any help would be much appreciated.

View 3 Replies View Related

Help With Access Database

Feb 26, 2007

Hello,

I want to do something quite simple to start with and expand on it as my knowledge of databases grows.

This is what I need:

Open Access
Window appears ''Type company name'' and a textbox
Company001 is typed and a new window appears with something like: Add, Edit, view, Switch company.

Next to ''add'' there should be a dropdown list were the user can type in the name or select it from the list (something like if you type the first 3 letters the whole word will come up). Now comes the part which I cant do: i need the user to either press enter or click on a ''go'' button which takes the user to a new form to enter details. Just like the name their typed where a button.

View 1 Replies View Related

Access Database On Web...

Oct 12, 2004

I need some suggestions on how to put my access database into the web. Here's what I have and here's what I need. I have a database with forms that need to be put on the web so that users can fill out the forms. The first thing that should appear is a switchboad and they can then select which ever form they want to fill out. There's a total of 4 forms right now. If anyone has any suggestions let me know.

View 3 Replies View Related

Access Database

Apr 21, 2005

Hello,
I am doing a project in Ms Access for a Restaurant. I am doing their booking system and take away odering system and would like some help in it.
I have created some relationships which I have attached.


I need to find out how can I check the allocated restaurant table bookings

View 1 Replies View Related







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