Avoiding 20 Levels Of Iif-Then-Else

Mar 14, 2008

I'm sure there's an easy solution to this somewhere...

I have a query that is supposed to assign a wage to a production job if the range output falls within a certain percentage range. For example, if they produce 125% to 130% of their goal, their wage is 15 cents higher. If it's between 130% and 135% of their goal, their wage is 30 cents higher. There are about 20 ranges that my bosses want set up. Short of making the longest Iif-Then-Else statement in history, does anybody have any suggestions? Should I use a separate table and somehow try to integrate it into the query?

View Replies


Avoiding Key Violations On Import

May 1, 2007

I have updated a database I created with additional reports, some UI
enhancements, etc., but have not changed anything about the table structure, field types, etc. The database has been in use for about a week by the user and I was working on my local copy. How do I provide the updated database to the user without incurring key violations on the auto-number PKs when their data is imported into the new version?

View 9 Replies View Related

Avoiding SumOf Prefix

Feb 26, 2007

I wish to avoid the SumOf, AvgOf prefix in queries. I am aware that I can write sales:sales but in a query with 50 columns that is somewhat annoying.

Any help would be appreciated.

View 1 Replies View Related

Avoiding To See Today's Data

Mar 25, 2008

I have a query that is pulling data from a table containing a Tamestamp field. I want to set the query to pull my data but don't include anything that was logged in TODAY. How can I set this in my criteria?


View 2 Replies View Related

Avoiding Duplicate Dates

Mar 2, 2005

Hi there

I want to avoid duplicate dates in the date field of my form. It's a little more tricky than it sounds though. Imagine two fields in a form; one list box of eleven values and one date field. Once i have chosen a value from the list box i enter the date in the second field. It is ok for one value to have the same date as another value (in another record) but i don't want to have duplicate dates for one value. Any idea how to SIMPLY overcome this problem?

Not really looking to fully understand how it all works, i would be happy just to fix the problem.


View 1 Replies View Related

Avoiding Divide By Zero Error

Aug 25, 2005

Hi all.

I have three subforms on my main form. They all display salary details from different sources, and each subform has 2 calculated fields in the form footer to show the average salary and the number of records on which the average has been calculated.

I then have a field on the main form to calculate the average of the averages which works OK unless one of the subforms has null or zero in it, in which case it returns no information.

Can anyone suggest a way of bypassing this divide by zero error? The code I'm using to calculate the average of averages is as follows:

Me!Text44 = ((Me![Frm1 subform].Form!text4 * Me![Frm1subform].Form!Text6) + (Me![Frm2 subform].Form!text4 * Me![Frm2 subform].Form!Text6) + (Me![Frm3 subform].Form!Text6 * Me![Frm3 subform].Form!Text8)) / (Me![Frm1 subform].Form!Text6 + Me![Frm2 subform].Form!Text6 + Me![Frm3 subform].Form!Text8)

Thanks for any help you can provide...

View 3 Replies View Related

Avoiding Make-Table Queries

Mar 28, 2006

I have 4 queries needed to power one report. I've tried combining the queries into one so I can run the report off that. However, there is too much data and I get all sorts of errors. My only solution was to toss that data into a table thereby eliminating all the calculations and expressions and cleaning up the data. Is there a more elegant solution to this issue?

View 3 Replies View Related

Avoiding Duplicity & Referencing Records

Jun 5, 2005

nuther question from the forum dunce I'm afraid,
I want to ensure the user of the form cannot enter the same [cboPlayerName]
twice for the same [txtMeetDate] (thanks for the advice trubolotta, I changed
the name of the [Date] field.) The user will select the PlayerName from a combo
box. Can I have the list in the combo box diminish by each player as they have
been selected for a [txtMeetDate] I suspect a monstrous amount of code &
intellectual input will be required to achieve this. Basically, what I'm asking
(this time !) is how can I have my program search my tblScratchScores for
duplicate names for the [MeetDate] that I am currently inputting Data for?

View 1 Replies View Related

Avoiding Make-Table Queries

Mar 28, 2006

I have 4 queries needed to power one report. I've tried combining the queries into one so I can run the report off that. However, there is too much data and I get all sorts of errors. My only solution was to toss that data into a table thereby eliminating all the calculations and expressions and cleaning up the data. Is there a more elegant solution to this issue?

View 2 Replies View Related

Avoiding Duplicate Records Without Using Primary Key

Sep 21, 2015

I have a modest sized data base and have been having trouble keeping out duplicate records with the same last name, first name, and DOB. I know I could use all 3 fields as a primary key, but I would like a simpler way of checking for duplicates.

View 3 Replies View Related

Forms :: Avoiding Duplicate Entries By Same User

Aug 1, 2014

If different people will be entering data into a "new donor" form, how do I keep them from adding the same person a second time?

It's possible people could have the same name, and it's possible that two people at the same address could be donors. So I assume I would want a "no duplicates" on the combination of name and address, right? But how to actually do that.

View 6 Replies View Related

Modules & VBA :: Using FSO To Write To Text File - Avoiding Conflicts

May 21, 2015

I have a function to write some data to a text file (as an activity log, separate to the live data contained in the DB)

It uses the FileSystemObject.OpenTextFile method and works fine

However, I'm conscious that, although perhaps unlikely, there is the possibility (which is enough for me to worry about it) that multiple users could trigger the function simultaneously, which could cause a conflict when multiple FE's try to write to the same log file at the same time.

So I'm trying to add some code to prevent this from happening, by checking if write-access is available before proceeding.

Below is the piece of code I've added. Was considering, as an alternative, looping until the objFile is no longer Nothing, rather than depending on the Err.Number?

Dim objFSO As Object
Dim objFile As Object
On Error GoTo ErrorHandler
Set objFSO = CreateObject("Scripting.FileSystemObject")

[Code] .....

View 3 Replies View Related

Tables :: Avoiding Currency Format When Storing Amounts

Feb 15, 2013

I want to store currency amounts but not use the currency format. My DB is set to use all currencies and provide in all currencies.

Do I use the SINGLE data type?

View 1 Replies View Related

DB Design To Eliminate Duplicates While Avoiding Compound Key Fields

Nov 10, 2013

I'm getting back into Access after retiring and about 10 years of isolation (from Access). I have 2010 version and know that one should avoid duplicate entries and a way to do this is make those fields unique key fields. I have a Customers table and have bounced back between CusID (AutoNumber) and Compound Keys (CusFName and CusLName) as the key fields. The compound keys prevent duplicates but become very hard to work with later in code and expressions. The CusID is preferable from that standpoint, but can't prevent inadvertent entry of duplicate names.

View 2 Replies View Related

Avoiding DB Login Screen Everytime We Run MS Access DB Queries Which Have Oracle DB

Oct 9, 2006

Hi -

Currently I have MS Access DB which has some Oracle database table reference using database link concept. I have entered DSN Name,user id and password which it asks when I try to run some queries which will fetch data from oralce DB linked tables.If some wants to use my MS Access DB, they need to have DSN and everytime they run queries related to Oracle database table reference, it will ask for DSN,user id and password. For this I need to share the user id and password credentials to everyone who wishes to use my MS Access DB which I don't want to. Is there a way to avoid the login window whenever some one wants to use my MS Access DB without asking for oracle user id and password credentials everytime? My ultimate aim would be encrypt password for others.


View 4 Replies View Related

MS Word Link MS Access Table Data - Avoiding Duplicates

Dec 7, 2007

Hi All,

I have an MS Access table that currently links into word as a mail merge. Great!

Sample data as follows:

Tutor Student
Mr A Donald Duck
Mr A Mickey Mouse
Mr A Minnie Mouse
Mrs B Joe Bloggs

I want to produce a mail document that allows me to address each tutor separately, along with the respective student names in a grid.

Now I've setup the document, but when I view each document it produces the list of all students for each tutor.


Dear Mr A

Your students are:

Donald Duck
Mickey Mouse
Minnie Mouse


Dear Mrs B

Your Students are:

Joe Bloggs

Is this at all possible?


View 1 Replies View Related

Access Levels

Apr 10, 2007

Iv got a user table with an admin record and head teacher record with the highest access level

I then have 2 teacher records with a lower access level

The admin and headmaster have access to the whole system this includes assigning user name and passwords. However I don't want the head master to be able to change the admins password, so is there a way to lock this record or even hide it from a user form

View 5 Replies View Related

Stock Levels

Oct 16, 2007

Hi hope someone can help. Thankyou in advance.

I have a small database for my warehouse that sells washing machines, fridges etc.

I am trying to get a grip on the stock control.
What I am looking for when a order is filled out on our order form is the stock number will reduce by the amount sold. Not sure how to make this happen.
I have the number of units in stock under the products table

ProductsID PK

Sounds simple but for some reason I cannot figure it out.


View 1 Replies View Related

Stock Levels

Feb 7, 2007

hello, i am new to this forum. i have been struggling on a project i am doing where i am tring to calculate the stock levles and keep track of them along with the re order level
i have calculated the current stock levlel, in a query called "stock level 3"
Here the total amount prodcuts sold are taken from the field called stock level.

Here is a break down of my original tables


And all their personal details such as contact details

This is where the order takes place and contains the following information

Delivery costs
Overall discount
Final Costs

Here is the specific details of one order.



Prod_ Unit_Details

SUPPLIER TABLE – with detaisl e.g Supp Id and account number


Money_Owed Delivery
Supp_Credit_ Limit
Overall discount





•In the query “All customer order details”, I have worked out the line total for each prodcut with in one order. I have timed the Qty_on_Order (customer order details table) by price (in the produt table) and by the discount(customer order details) this then gives the line total

Now to update the stock level I made a new query called “stock level Query”, where I added up the total number of each products sold, by adding the “Qty_on_Order” from the query “All customer order details”

I then made a new query called “stock level 2” where I calculated the amount left on the shelves by taking “SumOfQty_on_Order” of each product from “Qty_in_Stock” (form prodcuts table) to produce the field called “Qty_in_Stock”

I then made a new query called “stock level 3” where I inserted the same fields but an extra field called “Re_Order_level” for some reason could not add this to the query "stock level 2"

So far the system can add up the total number of products sold, for all the orders, and then automatically calculate the Qty_ in_ stock by taking away the “SumOfQty_on_Order” once a new order is made.

I then made forms where I go in my form to “customer”" and then to “making new order”.
Below is a sub form called “all customer order details sub form” . Here orders are made with defining "Qty_on_Order

I want to make a system which calculates for me i have ordered more stock then there is.
Howcan i now when i make sure when i place a new order in the query"All customer order details" , that if i order above the number of "Qty_in_Stock" (from query srock level 3), from the query “stock level 3”, that when I order more products then ““Qty_in_Stock”, in the query “stock level 3”, does not allow me to enter this and if it is possible please can you insert error messages on it.

I do not know if this helps .- I can not make the “Qty_in_Stock”, to appear in the actual table “Products”.
At the moment I can only update this in the query “stock level 3”. I am not sure if I need this so I can then set re order level which then comes up with an error message telling me when the re order level has been reached. -

As later on I will need to add on any products brought in from the suppliers to the Qty_in_Stock”, in the products table to be automatically updated.

"stock level 3".
here are the fields

Prod_ID (Products)
Prod_Name (Products)
SumOfQty_on_Order (from "stock level Query")
Qty_in_Stock: Products.Qty_in_Stock-[SumOFQTY_on_Order]
Re_Order_level (Products)

here are both sql from both queries

All customer order details

SELECT [Customer Order Details].Prod_ID,
[Customer Order Details].Qty_on_Order,
[Customer Order Details].Discount,
(1-[Discount])/100)*100 AS Line_Total,
[Customer Order Details].Order_ID,
[Customer Order].Cu_ID
FROM [Customer Order] INNER JOIN
(Products INNER JOIN [Customer Order Details]
ON Products.Prod_ID=[Customer Order Details].Prod_ID)
ON [Customer Order].Order_ID=[Customer Order Details].Order_ID
ORDER BY [Customer Order Details].Order_ID;

stock level 3

SELECT [All customer order details].Prod_ID,
Products.Prod_Name, [stock level Query].
Products.Qty_in_Stock-[SumOFQTY_on_Order] AS Qty_in_Stock,
[stock level Query].
FROM (Products INNER JOIN [All customer order details]
ON Products.Prod_ID = [All customer order details].Prod_ID)
INNER JOIN [stock level Query]
ON Products.Prod_ID = [stock level Query].Prod_ID
GROUP BY [All customer order details].Prod_ID,

please may help me and gice m,e soem tips it will be much appreciated or website/downloads.
Thankyou for your help, and if you find easier ways to do this can you help me.
Thank you so muh.

View 1 Replies View Related

Macro Security Levels

Nov 3, 2005

Has any one found out a way to change Macro Security Levels!!
Microsoft seems to have kept this as a secret. The code below given in the help files doesnt function.
Application.AutomationSecurity = 1
Application.AutomationSecurity = msoAutomationSecurityLow

View 8 Replies View Related

Subtracting Stock Levels

Nov 9, 2005

Hi, I have a data base that is used to keep track of stock level. When i issue a stock item and move to the next record I would like the stock level to be reduced by 1, any ideas.

View 2 Replies View Related

Adding Stock Levels Together

Nov 12, 2005

I have a database which seems to open many copies when it is accessed over the internet (via ASP) but If I open it on my compter over my LAN then it seems to open 'exclusive' and those on the Internet get the error message that 'file is already in use'.

So I have devised a method where I will make a copy of my database on my computer, clear all the stock levels and then add in the new stock.
My question is - how do I write a query that adds the 2 stock levels together?


View 1 Replies View Related

Macro Security Levels

Jan 7, 2006

I've written a db which I will be putting on someone elses machine.

I want it so there is a short cut that directly opens the db from their desk top. I'm happy about setting up the 'on open settings' so it goes to the default page etc, however what I do want to avoid is the macro warning at the start when access opens up.

I know one way to avoid this is to drop the security level down from medium to low. It mentions that this is ok providing the machine in question has good anti virus software installed - which it does.

So, here's my question. Is it really ok to drop the security level down or am I potentially going to screw up my mates machine . Alternatively, is there a better way of doing it

Many thanks

View 1 Replies View Related

Multiple Levels Of Data

Jan 14, 2008

I'm fairly new to access, having done a lot of what would have been easier with access in excel. I've decided to make the switch but need one particular thing that I can't seem to work out.

I have a series of "Courses" which contain a series of "modules" and each module has various amounts of data that needs to be accessed.

Is it possible to have module tables embedded in the courses table. Or, do I have to just have one massive table that contains ALL the modules with a field that says what course they belong to. Then make queries that display only the modules of that course? Or is there another way to do it?

I also haven't gotten to learning about queries yet, so if this is the way to do, can anyone explain how or better yet, point to a tutorial that can explain how this is done?

View 6 Replies View Related

Adding Security Levels For Different Users

May 15, 2005

I run a school library database (Access 2003) and want to set up a password logon system so that different users can get at different parts of the program - e.g. Administrator (everything), Librarian (can add and delete records but not change the database design), Student (can only access certain areas, read only).

I've tried using the security wizard to set this up, which seems OK until you then open the database again. I would expect to then get some sort of log-on screen next time I open the database, but instead it opens normally, but then won't let me do anything because I "don't have permission". I had to restore a back-up copy.

I must be missing something obvious here. Is there a place to look for instructions? Couldn't find anything useful in the help screens.


View 2 Replies View Related

Access 2000 Security Levels

Nov 11, 2005


I have produced a database in Access 2003 and saved it as an Access 2000 format. However when it is used on PC's with Access 2000, some (not all) users are getting messages displayed when they open the database that Access cannot open the database due to the Security Levels.

Can anyone tel me where I can find the security level settings on Access 2000, I've found them in 2003, but not 2000!

Can anyone help.



View 1 Replies View Related

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