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 Replies


ADVERTISEMENT

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

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

Queries :: Return 0 Where Data Does Not Exist For A Particular Month

Mar 13, 2015

I'm trying to make a query to return payroll data, but I'm not sure how to get Access to return 0 where data doesn't exist for a particular month.

For example, imagine this table:

Name MonthHours
John 1 160
John 2 160
Dave 1 160
Dave 2 160
Matt 1 160

How would I get this ouput:

Name MonthHours
John 1 160
John 2 160
Dave 1 160
Dave 2 160
Matt 1 160
Matt 2 0

View 10 Replies View Related

Forms :: Validate Field Data If Result Exist In Query

Jun 19, 2013

I have a form that contains two text fields i.e.; [Scat_text] and [STyp], which each can be changed by the users. I would like to combine the results of the two fields together and validate if the results exists in a query. What would be the best way to accomplish this?

View 1 Replies View Related

Reports :: How To Build Weekly Report Even When No Data Exist For A Week

Jun 11, 2013

how to build a weekly report to count the number of computers that have entered a defined process. I have four processes and I need the report to show counts for each process even if it's zero. The report is supposed to show the history of each process and not just the current week. Is this possible to do in a single query? Or do I have to make multiple queries?

I have a table that holds the history of each workstation including the workstationName, date of the record, the phase of the workstation, and the status of the phase. Another table holds the phase codes and phase statuses for lookup purposes.

View 2 Replies View Related

Modules & VBA :: Checking If Data Entered In Form Field Exist

Jan 17, 2015

I want to check if data entered in a form field is existed

The form is bounded to a table

I used this code

If DLookup("Telegram_Number", "tbl_Violation_Of_Building", "Telegram_Number Like " & Forms!frm_Add_Violation_Building!Telegram_Number) Then
MsgBox ("number existed")
Me.Telegram_Number = ""
Else
End If

everything is ok but if the data is existed the database show the message and clear the field but i'm getting a Run-time error

'-2147352567(80020009)': the macro or function set to the beforeupdate or validationRule property for this field is preventing [ISF] from saving the data in the field

I guess the problem because the form is bounded to a table so he will save automatically

My solution is to unbound the fields and save the data via vba but is there any solution with a bounded form???

View 3 Replies View Related

The Actual Data, Not The Record Cell Reference

Oct 23, 2007

I have entered one entry in to the database with the correct values (this is record 6) and everytime I enter a new record, the data is the same (I'm using a drop down list) it will automatically appear in the box. But when I goto the table that the data is stored in, each field just has the reference to the first record that the data came from.

Looks a bit like this:

ID Server Name Pattern Engine Program
6 LN1HOME 4.735.00 8.500-1002 5.58.0.1185
7 LN1WORK2 6 6 6

Is there a way of seeing the origonal data in those fields other than the Record ID Number as a reference. :confused:

I know its a lame question, Im just is a learning process at the moment.

thanks in advance.

View 2 Replies View Related

Tables :: Source / Reference Of Different Data Points

Apr 24, 2015

I want the user to be able to see the source/reference of (many of) the different data points in my database, so I need to store sources/references in the database itself. I want to have all references in one single/common table (list of references). Each reference may be the source of many data points, in different columns in a given table, and in different tables. Is this possible, and can it be done in an elegant way?

View 2 Replies View Related

Subform/ Subreport Query Data Row Number Reference

Jul 20, 2005

I am new to this and i may be going about this the wrong way but what i am doing seems to do the job until now.

I am making a form that has a combo box, a few text boxes and a subform subreport on it.

The idea is that the first thing a user does is to select a name form the combo box. this name is then stored as a sring and used to set the forms record source and then the subform's (called window) source object. the string is slightly modified during the process to do this. That part works fine.

The problem arose when i included text boxes to show infomation from the selected Query thatisant show in the window (subform).

After the user selects a name and the name is used to set up the record source and the source object for the text boxes.it then displays in the text boxes the records extra data. however it only displays the first row extra data.And when other rows in the query table are selected the data in the text box stays set as the first row.


I know that this is because i haven't programed in an event that makes the text box data update when the user selects a new row.

i also realise that i would need to have some way of know what row of the quiery table the user is looking at to be able to update the text boxes.

my questions are

Is there a way to tell what row of a query table in the subform is selected ?

Is there an event similar to on selection of row or something like that that i could use to reload the text boxes?

and finaly

am i going about this the right way?

Any input on this would be greatly appreciated :)

View 5 Replies View Related

Can Excel Spreadsheet Reference Access Table For Its Data

Mar 27, 2015

Can an Excel spreadsheet reference an Access Table for it's data? Sort of like a vlookup, but instead of referencing another spreadsheet, I'd like to pull data in from a database.

View 1 Replies View Related

Queries :: Reference (parent) Description In Hierarchical Data Table

Apr 30, 2015

I have a table I'm trying to query information out of. Key fields are below:

RecNo (Key)
ParentRecNo
Description

I need to have a "record" in the query show both the description of itself, as well as it's parent. I was hoping to use Dlookup directly in the query design. If there is no other way, I suppose I could create a temp table and look through the recordset in VBA and dump them into the temp table, but like I said; quick and dirty was the hope here, it's for my own use, and the tables aren't large 50-100 records is what I'll be pulling out when I use this.

View 1 Replies View Related

Autofill Data To A Main Table From A Reference Table

Mar 19, 2007

First of all apologies for the lack of proper terminology I'm a novice Ms Access user and I like to thank everyone in advance for trying to help.

Ok here is the situation:

I have two tables, NewJobs and Contacts which have the following fields.

Newjobs
--------
JobID (AutoNumber, Primary Key)
JobName
JobDate
JobDescription
JobOwner (Linked to table 'contacts' via LookUp)

Contacts
---------
DisplayName
EmailAddress
Department
Extension

Ok basically what I want is to have a form based on table NewJobs which will allow me to enter new jobs into the database. When I get to JobOwner a drop down list linked to 'Contacts' table will show me all the data from column 'DisplayName' and allow me to select it (saves time on typing). I have already done this and its not a problem.

Now I would also like in the same form to have additional fields from table 'contacts' such as EmailAddress, Department and Extension which will autofill with the right information soon after I select a JobOwner from the drop down list.

So for example if I select 'Joe Bloggs' Access will automatically fill the additional fields in the form with Joe's information (department, extension etc) from the Contacts table.

I hope all this makes sense. Thank you all for your support.

- Mitch

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

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 2 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

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







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