Showing Only One Entry If More Than One Exist

Mar 1, 2007

Hi all,
I have a form that is based on a query that uses a yes/no option as the filter. the problem i am having is that in this form if a user has more than 1 no entry the users name shows up as many times as entries that they have. i would like this to be shortened down to only one time for all no entries. is this done within the query?
SELECT Employee.EmployeeLastName, Employee.EmployeeFirstName, Employee.EmployeeID
FROM Employee INNER JOIN Expense ON Employee.EmployeeID = Expense.EmployeeID
WHERE (((Expense.AdminApproval)=No));


OR could this be done better in the on load of the form using a counting loop?

View Replies


ADVERTISEMENT

Automatically Add Entry For Associate If No Entries For That Month Exist?

Sep 28, 2015

I have a database that is tracking attendance for several 100 employees. The Db is mainly used to log any policy occurrences (no call, no show). If an associate doesn't have any occurrences for a month, then they get a point credit. Right now, I set it up so the credit can be manually added. the problem is a supervisor (the user) may not know if their associate should receive this credit unless they review their attendance report. Opening the form to add a policy occurrence, then running a report to only re-open the same attendance form is inefficient. What I'd like to have is a way to have a credit automatically added if they did not receive any points for a particular month.

ps. My office does not allow uploading any data/files so I am not able to upload a copy/sample.

View 4 Replies View Related

Form Showing Entry

Nov 1, 2007

I have got a db when I enter a new client in the client form it saves it in the table but when I return to the form the client I have just entered is still there so I cant enter a new client it does'nt clear the text in the text box can anyone help

Thanks

View 2 Replies View Related

Forms :: Access 2010 / Showing / Hiding Fields Based On Previous Entry?

Mar 26, 2014

I am using Microsoft Access 2010.

I have a form, having following fields

Nationality, Combo box, Options are Indian/foreign State: With list of States in India.

What I want is, when data entry operator , select, Foreign, State field automatically hides.

And when data entry operator , select Indian, State field shows in the form.

How this can be done in Access 2010

View 5 Replies View Related

Queries :: How To Trigger By Date To Create A New Entry In Database Based On Old Entry

Aug 6, 2014

I have a database that makes use of standing orders. That means that if a client has a standing order to receive products during for example 4 time as year (quartely at the end of the month). to automate the new entry by copying an old entry in the database.

Let's say I have a client where we will have to send a product at the end of June, it will look at a field where the next send date is, and when it reaches 2 weeks for that date, to create a new entry in the database based on that entry. This way, it will pop-up in our open cases and we are aware of it and also will be visible in our report.

View 1 Replies View Related

Forms :: Combo Box To Verify With Last Entry And Display Other Options Than Last Entry

Sep 8, 2013

I am working on creating an access database for tracking physical assets linked to locations. I need to make a combo box list to show items other than the current location of the asset. Basically I need it to refer to last enery of the user and define the new possible entries. so we have a unique relationship between location and asset. The assets and location will always remain fixed and there is never going to be any addition. I am creating a web form so that it can be uploaded into sharepoint.

View 3 Replies View Related

Does A Folder Exist

Feb 21, 2007

Hi,

I've got an Access 97 piece that imports text files, copies and moves the used files and several other things.

I've now been asked to enable it to create a fairly complex folder structure.

I've done that, but I'd like to be able to issue a warning if the root folder already exists, can someone please show me how to check if a particular folder exists (I don't particularly care if its full or empty).

View 3 Replies View Related

How To Use IIF When More Than Two Alternatives Exist

Aug 24, 2006

Hi,
My database has 3 fields ID,Cust_Balance,Cust_Type.
I need to assign Cust_Type as 1,2,or 3 based on Cust_Balance amount.
If Cust_balance is lessthan 3 million then Cust_Type is 1,if between 3 and
10 million then type 2 and,more than 10 million as type 3.How do i accomplish this in Access ?Is IIf the right choice?:confused:

View 1 Replies View Related

Not Exist Join

Apr 11, 2007

It was suggested to me to use a Not Exists Join to accomplish the below problem. I'm not sure how to write SQL for this.

I have the following:

1,000 records in table A

500 records in table B

Field ProductId is common to both tables.

If a ProductId from table A does not exist in B table a record needs to be added to table B. In this case 500 records from table A need to be added to table B.

View 4 Replies View Related

If Prim. Key Exist - Update

Jun 12, 2006

Hello all. I'm trying to finish up a database for our farm and am running into issues as I'm pretty new to Access. I know VB6 but not a lot of VBA. We spray chemicals, and need to keep track of the acerage we spray for the date.

So here's my problem:
When I go to write my records, I need to search a table for a date. If the date exists already, then I need to update the total acreage related to the date. So first, how do I search the table and keep track of if the date was or wasnt found, and if found, calculate total acreage from value pulled from table, and the new acreage value, then write that back to the table.

Would really appreciate the help. Thanks.

View 4 Replies View Related

How To Reference Data That Does Not Exist

Aug 1, 2006

Hi,

I have an access database with 8 tables and as many queries and forms. Our company uses an application that performs backups of other companies data, this data is imported into access into one table. The backups are scheduled to run overnight, but sometimes they do not start for whatever reason. We need to use a query to identify when a backup does not start, so therefore to identify when data does not appear or exist in the table.

This problem is only concerned with two tables. In one table i have the backups policies (Backup Policy) and the details about when the backup should run. In the other, the main table (Backup) is the actual data that has been imported. So far I have queried only the backup policies that should run, but i need to go one step further and compare this to data in the Backup table that does not exist.

Im not sure whether this should be a bit of code in the query that compares data in the Backup Policy table with that in the Backup table when it is not present.

Ideally i need something that says. "If a particular policy name does not appear in any record in the Backup table, report back a list of policy names."

OR

(Lookup a list of policy names in table backup policy,

if these policy names do not appear in the backup table, report back a list of the policy names,

if these policy names appear in the backup table, do not report back a list of the policy names)

If anyone has any ideas if this is possible, and how, I would be most grateful. Also, if it involves the use of code or functions etc I may need a little bit of guidance!!

Let me know if you need any more details of the table structures.

View 4 Replies View Related

Field Does Not Exist - Any Useful Functions?

Aug 6, 2007

I need a function or way of dealing with a field that may or may not exist.

I am crosstabbing a large database and then building queries on the crosstab. However, the field from which the column headings come does not always have the same data in it as I have to cut the data in different ways (always similar but not always the same). As a result, sometimes I get the error message:

"The Microsoft Jet Engine doesnot recognise [FIELD] as a valid field name or expression"

where a field I was expecting did not appear.

If it was a null value within a field I remove it like this:
iif([Field] is null, 0, [Field])

Is there an equivalent formula for "exists" that will stop my queries falling over when it cannot find the field?
eg iif(exists([Field]),[Field],0)

Any help, guidance or assistance gratefully received!

View 2 Replies View Related

Check To See If A Record Exist

Nov 27, 2007

I would like help with a macro that looks to see if a record in my database table exists, then if it doesn't it adds a record with my data, but if the records does exist, it stops the routine and sends a message box to prompt if you want to continue with adding a new record.

The problem that I'm having is that my macro errors out when it doesn't find a record. I just want my macro to just see if a record exists or not. Then I can write my Iff statements based on whether it finds our or not. How do I just have my macro check for an record, then if it doesn't exist tell that it doesn't exist and not stop my macro. Is there some kind of IfExist() function or something?

Thanks for any help anyone can give me.

View 4 Replies View Related

Check If The Data Already Exist

Jan 26, 2005

Hi,

I put a Dlookup function to compare the new entry in a form and the code is like this:

If (Not IsNull(DLookup("[empno]", "Attnd_tbl" , "[empno]=[empnotxt]")))then
MsgBox "This Employee Already Exists"
cancel = true
Me!empnotxt.undo
end if
end sub

this works for comparing one field only, since I want to check if the employee is already entered on a certain date, how do I put two fields in this function to be looked up if for example "[empno]and[date]","Attnd_tbl","[empno]and[date]=[empnotxt]and[datetxt]"

View 4 Replies View Related

If Record Doesn't Exist

Feb 21, 2005

I'm using the following code to autofill the city and state on my form.
I can't figure out how to capture if there is no matching record in the table.
If there is no matching record, I will:

1) inform the user with a msgbox
then if the user wants
2) open a form to add the record to the table


Dim rst As DAO.Recordset
Dim db As DAO.Database

Set db = CurrentDb
Set rst = db.OpenRecordset("tblZipcodes", dbOpenTable)



rst.MoveLast
rst.MoveFirst

Do Until rst.EOF

If strZipLookup = rst!ZipCode Then
Me.txtCoCity = rst![ZipCity]
Me.cboCoSt = rst![ZipState]

End If

rst.MoveNext

Loop

rst.Close
End If

How can I capture if there is no matching record in the table?

Thanks,

Sup

View 2 Replies View Related

Record Source Does Not Exist

Oct 7, 2004

I have set up a simplified event booking procedure, similar to the one generated by the access event manager wizard. It uses three tables, one with attendees details, one with the event details and abooking table that links the attendee ID with the Event ID.

The booking table uses commands similar to SELECT[Names + Contacts].[ID],[Names + Contacts].[Surname]FROM[Names + Contacts] to generate drop down lists of surnames and events so that the two can be matched together.

This works fine as a table.

However when placed into a form, whenever the form is opened I get an error message saying the record source specified on the form does not exist.

I have tried regenerating the form, etc. I have used a wizard to generate the form, closed the form, not changed anything in the database and then tried reopening it and I get the error message, can anyone shed any light?

Also if you accept the message then it knows how many records there are, so it must know there's something behind it, also if you change to design mode and then back to form mode, it finds all the data.

View 4 Replies View Related

F30 Does Not Exist In Destination Table

Jan 28, 2015

I am trying to import data from excel into one of Access table but it showing error F30 does not exist in destination table. I have checked headings which are matched. Same sheet tried to import in access successfully, but unable to import specific table...

View 1 Replies View Related

Query Returning Records That Don't Exist!?

Jun 21, 2005

Hello all

I had a query which was working fine to tell me the number of weekend bookings for holiday parks for a specified year:

SELECT Bookinfx.[Park Name], Month([Start Date]) AS FilterMonth, Year([Start Date]) AS FilterYear, Count(Bookinfx.[Park Name]) AS Bookings
FROM Bookinfx
GROUP BY Bookinfx.[Park Name], Month([Start Date]), Year([Start Date])
HAVING (((Year([Start Date]))=2005));

However it has become necessary to only find bookings of specific accommodation types so I modified it like so:

SELECT Bookinfx.[Park Name], Month([Start Date]) AS FilterMonth, Year([Start Date]) AS FilterYear, Count(Bookinfx.[Park Name]) AS Bookings
FROM Bookinfx
WHERE ((Bookinfx.Day)="FRI" Or (Bookinfx.Day)="SAT") And ((Bookinfx.Nights)<=3) And ((Bookingfx.[Accom Type])="CHALET/LODGE" Or (Bookinfx.[Accom Type])="STATIC VAN")
GROUP BY Bookinfx.[Park Name], Month([Start Date]), Year([Start Date])
HAVING (((Year([Start Date]))=2005));

Now when I run this, the first problem is that it asks me for the accommodation type, which is odd as I've already specified this in the query. The second problem is that if I enter say 'chalet/lodge' it returns records telling me that there are bookings for chalets and lodges at parks that only have camping! I have trawled through the database to make sure no erroneous records exist and so I know it is a problem with the query.

If anyone can shed any light on what I've done wrong, I would be extremely grateful! :)

View 2 Replies View Related

Find A Record That Doesn't Exist

Oct 26, 2005

I have a training database with multiple courses. Certain staff do course1 and thereafter course2. Course1 is only done once and course2 is a refresher done annually. I want the query to find staff that have done course2 but not course1.

Thanks.

View 3 Replies View Related

Queries :: Find If Value Exist In Either Of 2 Fields

Aug 7, 2015

I need to find all MaintItems which field MIC don't exist in either MIC1 or MIC2. So the only result which I need to see is MaintItem '5100161086' as MIC <> MIC1 Unfortunately I can create query which would approve '5100662734' as well

MaintItem ------MIC------ MIC1 ------ MIC2
5100634036 50000173 50000173
5100662790 50000174 50000174
5100662734 50000145 50000145 50000180
5100662734 50000180 50000145 50000180
5100161086 500001711 50000173

So bottom line I need a query which will display only the row below as MIC doesn't exist in neither MIC1 nore MIC2. Also I will have to deal with much more MICs soon so maybe there is a way to concatenate them and compare, isn't it? 5100161086 500001711 50000173

Attached query is what I got so far, but that displays last 3 rows of table above

View 3 Replies View Related

Delete Record Only If Child Records Don't Exist

Aug 6, 2005

Hi,

I'm trying to have a button on a form that would delete a record from a table only if there are no child records linked to it.

If there are child records for the selected record, the button would be disabled.

Is there a simple way of doing this?

TIA.

View 3 Replies View Related

Record Lock Status & Exist Query

Feb 12, 2007

Afternoon.

I have had a search through the forum however am unable to find anything...

I have two questions:

a) How do I check whether someone else is currently accessing a record / form?


i.e. Opening the form (SchemeDetails) like this:

DoCmd.OpenForm "SchemeDetails", acNormal, "", "", acEdit, acNormal
Forms!SchemeDetails.SetFocus
DoCmd.GoToRecord acForm, "SchemeDetails", acGoTo, tempVal

Can I check if someone else is in the specified record before I open it? Record Locking is (deliberately) set to "No Locks".

b) How do I check to see if a table exists?

i.e. If DataTable2.Exists = True then ...
Or something like this?


Hope someone can help me!

View 6 Replies View Related

Adding Primary Key Field To Exist Database

Jan 30, 2008

I have a database with 200.000 records, how I Add Primary Key Field.
I'm getting error "File sharing count exceeded..", tried to increase "MaxLocksPerFile" registry , but without success.

View 2 Replies View Related

Need Zero To Show Up In Column If No Fault Totals Exist

Aug 14, 2007

My problem is if there is no FaultTotals nothing shows up. I would still like for the Four Columns to show data and have a 0 in the FaultTotals.

How can I accomplish this?


In a nutshell I am totaling all Cosmetic Faults based on the SystemGroup CTWT and a Date Range. If there are
no Cosmetic CTWT Faults for the DateRange I want a zero. The query works great as long as there is at least
One FaultTotal for the Date Range.


SELECT "1-3" AS Truck, "Cosmetic" AS Category, WorkUnitsFaultsMainTBL.SystemGroup, Count(*) AS FaultTotals
FROM WorkUnitsFaultsMainTBL
WHERE (((WorkUnitsFaultsMainTBL.FaultCategory)="Cosmetic") AND ((WorkUnitsFaultsMainTBL.TodaysDate)
Between [Forms]![Queries_ReportsFRM]![StartDateTxt] And [Forms]![Queries_ReportsFRM]![EndDateTxt]) AND ((WorkUnitsFaultsMainTBL.BuildID) In ("E010","C809","F001","C810","F187","A910","M173","M174")))
GROUP BY WorkUnitsFaultsMainTBL.SystemGroup
HAVING (((WorkUnitsFaultsMainTBL.SystemGroup)="CtWT"))
ORDER BY Count(*) DESC;

View 3 Replies View Related

Append If Record Doesnt Exist, Else Update

Feb 19, 2008

I have a table that is filled based on selections that a user makes in combo boxes on a form. I am having trouble trying to figure out the best way to prevent duplicates from being inserted in the table when I do the append query part.

Since the table is filled based on the various selections the user makes I dont have a primary key or unique field.

Can someone help me figure out the best way to do this append/update queries to prevent duplicates. Also if you have a strategy for setting up some sort of unique or primary key for fields that could all be the same yet in the table only 1 record will show, no duplicates.

View 1 Replies View Related

Show Field In Form If Data Exist

Feb 9, 2006

Hi

I have to rethink and change the way of display in my form.

I have a form bound to ID.
I want to show 2 fields if they contain data, otherwise hide them
How do you do that?

Micke

View 2 Replies View Related







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