Queries :: List Box Data Based On Logged In Users Department

Jan 4, 2014

I have a list box with a row source query as follows...

SELECT qryPendingCompletions2.ID, qryPendingCompletions2.Department, qryPendingCompletions2.[Employee Name], qryPendingCompletions2.CompletionDate AS [Completion Date], qryPendingCompletions2.[Entered By], qryPendingCompletions2.Goal, qryPendingCompletions2.Comments, qryPendingCompletions2.[Verified By]
FROM qryPendingCompletions2
WHERE (((qryPendingCompletions2.Department)=[cbocurrentemployee].[column](3)) AND ((qryPendingCompletions2.[Verified By]) Is Null))
ORDER BY qryPendingCompletions2.Department;

I also have a combo box at the top of the form showing what user is logged in where the row source query is the following...

SELECT Employees.UserID, [First Name] & " " & [Last Name] AS EFullname, Employees.AccessLevelID, Employees.Department
FROM Employees
WHERE (((Employees.AccessLevelID)=1 Or (Employees.AccessLevelID)=2 Or (Employees.AccessLevelID)=3 Or (Employees.AccessLevelID)=4));

How to only list the data in the list box when the department is the same as the logged in user.

So I'd like to add the criteria to the first query something like criteria = [cbocurrentemployee].[column](3) but this doesn't seem to work as criteria in queries.

View Replies


ADVERTISEMENT

History/Audit Of Logged Users

Jun 20, 2006

Recording to a table Who is logged on to Database, When they logged on and when they logged off.
Gets tricky as I really would like the info to come from the mdw file(all users go through this for access)
If someone can help would be great. Need my hand held for this as I have been attempting to do this for over a month with no real success. I have so many samples that don’t quite make it happen I am now totally confused.

Forever grateful - every crumb helps

Danson

View 2 Replies View Related

Forms :: Show Users Logged In To Database

May 3, 2015

I would like to create a form that will show the users connected to the database. It would be kind of a tracker who opened the database to work on some cases. The form could show all users from the datbase from top to bottom and to the right a green or red round dot that she/he is active opened the database or not active (closed the database or did not open it still)

I was thinking that it could be applied when the main form opens and that form captures the login from windows into the "tracker" form.

I guess it will only work when the "tracker" form is first open. If the "tracker" form is open later, how to capture those logged in earlier?

View 14 Replies View Related

Modules & VBA :: Sending Message To Users Logged Into DB On Different Servers?

Jul 23, 2013

I have some code that when a check box in a table is ticked, sends a pop up message to the users logged in (message is on a hidden form), then it closes the DB after a pre-dtermined period of time.

The problem I'm having is that we are a large site with a about 25 differnet servers that our users log onto via Citrix, when a user is on a different server it isn't displaying the message nor closing the DB down.

trying to achieve this? Or is there a better way to see who is logged in and get a message to them?

I'm using Access 2003 btw

Code I'm using below

Code:
Option Compare Database
Private Sub Form_Load()
Me.TimerIntderval = 10000 ' change to 300000 for about 5 minutes
End Sub
Private Sub Form_Timer()
DoCmd.Close
Application.Quit
End Sub

View 9 Replies View Related

General :: Access 2007 Pop-up Message To Logged-in Users

Nov 14, 2012

As an "admin" of our corporate local db, maintaining and/or upgrading is my task.

Usually there are logged-in users, then I have to ask them (mostly via communicator) to please log off, because I can not modify with users in the db.

I would like to send these users a message via Access, like "Please log off from the db for maintenance blabla".

View 6 Replies View Related

Modules & VBA :: Email Based On Department Selection In Form

Nov 29, 2014

I am trying to generate an email that will send a copy of the last record entered from my table "Main" to a departement email, based on the department field entry on my form.

I know that I can send emails both thru outlook as well as direct. Would prefer to sent the direct (without opening outlook). Here is what I'm working with:Table with record informaiton called "Main"

Form called "Action Entry" which contains the information that I would like to send- part of which is a feild called "Assigned To" which is a list of departemnts linked to a secondary table called "departments"

Table called " departments" which contains the following Fields: ID, Departments, Email.What I would like to happen is when I hit the exit button on my form, an email goes out to the "Assigned Department" email address associated to the select departmet, that shows the information in the form (which i expect will be a report saved as PDF). I understand some of the VB code to create an email, but don't knwo how to tell it to select the correct email based on the Department selected on the form.

View 5 Replies View Related

Queries :: Counting Number Of Machines In Department And Total Migrated

Nov 7, 2013

I have an access dbase with a single table

I am interested in reporting so need totals, I can write a query that will count the number of machines in a dept like so

SELECT [Computer Inventory].Department, Count([Computer Inventory].ID) AS CountOfID
FROM [Computer Inventory]
GROUP BY [Computer Inventory].Department;

This works fine, however I now want to add more so are two fields

To_be_migrated
Is_migrated

These are just checkboxes so I assume criteria is true or false

I need a query which will give me

The total number of machines by dept
The total marked for migration
The total migrated

View 4 Replies View Related

Queries :: Creating A List Based On Multiple Queries

Jun 23, 2015

I have 3 select queries which Im trying to output to a combo - Ive tried a UNION query but I get an error

ODBC-- call failed ODBC Driver SQLBase.....

Firstly is do the results need to match within a union query? I mean they have no relationship what so ever Im just trying to populate this combo with the same results.

Secondly is there a better way to do it? 2 of the select queries query a linked SQL table and the third is a local table. All of the select queries work on their own.

View 2 Replies View Related

List Data In Subfrom Based On Combobox

Oct 26, 2005

i just to know how to list the all data at subform that same thing that i selected at combobox..

ok for example..

i want to list all car part that purchased in nov 2005 at subform...
date(nov 2005) selected from combo box...
then if i change other date (ex: dec 2005) it update n view new parts..

is there need some coding at macros?

plz help me im new with access... :confused:

View 2 Replies View Related

Queries :: Requerying A List Box Based On A Query

Oct 3, 2014

I have a list box (List25) that is generated from a query (qryThisBox). One of the fields in that query uses the criteria [Forms]![MyForm]![SelectedField] to filter.I also have combo boxes in the form that List25 displays in. Unfortunately, I want to requery the list box in the form, using a combo box that calls the same underlying table field, SelectedField.

How can I do this? Can I somehow dynamically change the criteria in qryThisBox to change when it gets requeried?How do I stack combo box requeries, eg: Combo Box 1 gets selected - does a requery

and/or

Combo Box 2 gets selected - and filters the results of the requery for Combo Box 1.

View 1 Replies View Related

Queries :: Can Run A Query Based On A List Box Selection

Jul 31, 2013

I have a query that allows the user to put in a date range - this works.He also wants to limit what he prints.

For example at the moment he gets

OrderA rest of line 1 for orderA
OrderA rest of line 2 for orderA
OrderA rest of line 3 for orderA
OrderB rest of line 1 for orderB
OrderC rest of line 1 for orderC
OrderC rest of line 2 for orderC
OrderD rest of line 1 for orderD
.
.
.OrderZ etc

He only wants to say print lines for OrderA and OrderD. It's he's choice and not based on anything else already in the table.

I see that in the criteria on the design for the query it allows me to bbuild an expression and I can select a list box on the form such as

[Forms]![name of form where list box is]![name of list box].[EXPRESSION VALUES]

I don't know which expression value to choose. I have tried afterupdate and beforeupdate but none of the rest look like they are the ones I should be using.

View 1 Replies View Related

Queries :: Populate Text Box Based On 2 List Box Selections

Feb 10, 2014

I have 2 tables.

tblOrderType

1 - Maintenance Order
2 - Breakdown Order
3 - Greasing Order

On my form I have two list boxes: An Order Type List box, and an Area Listbox.What query criteria or VBA code would I use so that I could populate a text box with the relevant order number based on the selections of the list boxes. i.e. MaintenanceOrder & Area Z would display MaintenanceOrderNoZ.

View 2 Replies View Related

Combo Box - Populate List Options Based On Data Already Entered

Mar 6, 2008

Microsoft Access 2003

Novice and working on a project with deadline... please help.


I have a table w a field that I want to convert into a combo bo and use data in the field as the options:


FIELD: Student Status


OPTIONS:
Enrolled
Suspended
Withdrawn


How do I get the combo box to automatically pull the values from that field into the options in the field when u pull down the drop down box?

Am I being clear?

View 2 Replies View Related

Queries :: Parameter Query Failed Based On Selection From Drop Down List

Feb 23, 2014

When creating a query I have set up a parameter query as instructed (in this case searching for a name) but when I run the query it returns the error 'this expression is typed incorrectly etc.'

I have worked out that this must be due to the fact that the names are not typed in by a front-end user but need to be chosen from a dropdown list (which i have stored in a separate table) - So, the query seems to fail based on that.

View 10 Replies View Related

Queries :: Form List Based On A Query Returns Original ID Value Not Field Text

Aug 14, 2014

I have a table x where the field value is selected via a combo box in a form that is populated from another table z.

When I look in x, it appears to have correctly stored the text from z, not the ID number.

I then built a Query, qX, which looks in x and grabs the fields I want. That query shows the text correctly in each selected field.

Now when I build a form, frmQx and use a List control, it displays some of the fields as ID values from the original table z, not the text values.

How can I get round this? I've searched and searched for an answer, sigh. Maybe I'm just not quite certain how to phrase the search.

View 5 Replies View Related

Department / Supervisor

Jun 26, 2006

Im having trouble determining where the supervisorID should go. Part of me thinks that it should go in the JobCodeMaster Table the other part of me thinks it should go in the DepartmentMaster Table. Any suggestions?

One other thing. Should i have a separate Supervisor table. Again im stuck on whether the supervisor is its own entity or just another employee?

thanks for the help.

Hooks

View 9 Replies View Related

Queries :: Extracting Data From List In Separate Field

Sep 19, 2014

695515*97
531924*11
495853*131
377035*181

Is there a way to extract the 97, 11, 131, 181 numbers from the above list in a separate field?

View 1 Replies View Related

Queries :: How To Reduce Down Data Set To Get A List Of All Unique Combinations Of Column

Jul 8, 2014

I am new to Access and am trying to reduce a dataset I am working with to make it managable for Excel. I have three columns which have three unique parameters and one column with numberical content.

Column A Column B Column C Column D
NJ Red Monday 10
NJ Red Tuesday 20
NJ Yellow Wednesday 30
NY Red Monday 35
NY Green Tuesday 40
NY Green Wednesday 60

I want to elimiate column C from the dataset, and sum column D for every unique combination of Column A & Column B. I have figured out how to reduce down the dataset to get a list of all unique combinations of Column A&B,what formula I can use in a query to sum column D on my table for every unique combination of column A&B. This is a simple SUMIF in excel, but my dataset is too large for excel.

View 4 Replies View Related

Queries :: Crosstab Query And Cache List Data (sharepoint)

May 20, 2014

My data is on Sharepoint. I have a simple Crosstab query that works well unless I choose the option "Cache List Data". In that case I get a Type Mismatch error.

Code:
TRANSFORM Sum(PivotData.QuoteTotal) AS SumOfQuoteTotal
SELECT PivotData.FullName
FROM PivotData
GROUP BY PivotData.FullName
PIVOT PivotData.StatusText;

View 1 Replies View Related

Modules & VBA :: How To Get List Of All Users In Active Directory - Show CN Name

Oct 10, 2013

I would like to get a list of all the users in the active directory and put them in a combo box. How to do this? I would like it to show there CN name

View 9 Replies View Related

Calculate Total Hours (for All Employees) On Each Department?

Sep 28, 2005

Hello, i have a table with the fields: "employee_number", "shiftdate" "department" "basic_hours", and "over_time"

And a query named "employee_hrs" looks at the fields in this table, i would like a new field in the query to be able to calculate the total hours for all employees together but for each department.

eg the total of: basic hours + overtime for department A)
the total of: basic hours + overtime for department B)
and so on for each department

would only like to show one instance of a department (distinct) with the total hours done by all employees for that department?, if any one could please help me out that would be great!?

View 3 Replies View Related

Queries :: Specific Date Range Based Off Of Other Data

Jun 14, 2013

I have multiple buildings that I own. Each building earns a monetary amount each day. Some days they earn $0, some days they earn $1,000. This is all kept track in a data base in which someone manually enters the information each day.The three fields are:

Building
Date
Profit

I have narrowed a query down to one building, and I am interested in two things. How do I write a query that shows a 30 day peak (the most profitable 30 days). In other words. I want to see the following
Building: GNB Tower Date: 02/14/13 - 03/15/13 Profit: $25,162

The next thing I am interested in is a 7 day peak from within these 30 days. This shouldn't be too difficult if I can figure out how to query these 30 days, I can query 7 days out of those 30 days. So this bigger mind stumper is the first one.

out of a date range of months and months (Let's say 10/12/13 - 6-14-13).Once I figure this part out, I am sure I can figure out how to compile all buildings into one large report with their 7 day peak and 30 day peak.

View 1 Replies View Related

Queries :: Find The Recent Available Data Based On Dates?

Jul 9, 2014

I have a price table:

Code:
tblPrice
PosNr PriceDate Company Price
1 01.01.2014 Firma A 5
2 02.01.2014 Firma A 7
3 03.01.2014 Firma A 9
4 04.01.2014 Firma A 8
5 06.01.2014 Firma A 6
6 02.01.2014 Firma XY 11
7 03.01.2014 Firma XY 9
8 04.01.2014 Firma XY 7
9 05.01.2014 Firma XY 8
10 06.01.2014 Firma XY 10

And I have a table with the dates, for which I need a price.

Code:
tblDates
PosNr PriceDate Company
1 01.01.2014 Firma A
2 02.01.2014 Firma A
3 03.01.2014 Firma A
4 04.01.2014 Firma A
5 05.01.2014 Firma A (no price available)
6 06.01.2014 Firma A
7 02.01.2014 Firma XY
8 03.01.2014 Firma XY
9 04.01.2014 Firma XY
10 05.01.2014 Firma XY
11 06.01.2014 Firma XY

And now I want to combine this tables, and for the dates which have no price, the last price should be taken.

Code:
tblResult
PosNr PriceDate Company Price
1 01.01.2014 Firma A 5
2 02.01.2014 Firma A 7
3 03.01.2014 Firma A 9
4 04.01.2014 Firma A 8
5 05.01.2014 Firma A 8 (actualy no priceavailable, so take last price)
6 06.01.2014 Firma A 6
7 02.01.2014 Firma XY 11
8 03.01.2014 Firma XY 9
9 04.01.2014 Firma XY 7
10 05.01.2014 Firma XY 8
11 06.01.2014 Firma XY 10

how I can get this?

I have this code, but it need hours.

Code:
SELECT tblDates.PosNr, tblDates.Company, tblDates.PriceDate, (SELECT TOP 1
B.Price
FROM
tblPrices As B
WHERE
B.Company = tblDates.Company
AND
B.PriceDate <= tblDates.PriceDate
ORDER BY
B.PriceDates DESC ) AS Price
FROM tblPrices RIGHT JOIN tblDates ON (tblPrices.PriceDate = tblDates.PriceDates) AND (tblPrices.Company = tblDates.Company);

View 14 Replies View Related

Queries :: Using Query To Extract Data Based On Numbers

Feb 18, 2014

I have a table with a field named BinNo which has a list of items with a bin no in the format 1.234( this number can be any number up to 6000.9999).

Is there a way for me to have a field on a form where I enter a number (i.e 1) and it lists all the items with a 1 before the decimal point but not 10 or an other number with a one in it. If I enter 10 then it will only give me the items with 10 before the decimal point and not 11 etc.

I have a query that pulls all the data into it but I only want the query to show the items relating to the number I enter into the form field.

View 2 Replies View Related

General :: Multi Users Making Synchronous Changes To SharePoint List In Citrix Environment

May 27, 2013

I currently have the following setup for my database which is working as desired when only being used by one user at a time:

Front end: Access 2010 database in Citrix
Back end: SharePoint List

The problem is that only one user can open the Access Database at a time since this action locks the database for other potential users. The locking occurs due to this link to the back end SharePoint list.

allow multiple users to update the SharePoint list through the access database at the same time?

View 2 Replies View Related

Queries :: Mark Disappear Field Data Based On Field Data Last

Oct 15, 2014

How Mark disappear field data based on field data last.

Example:I have a field type in the name and on behalf of another field No.

In the case of the Type-B data is deleted Number field, which is before the character.

View 1 Replies View Related







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