One Annoying Duplicate Record Problem!!!

Aug 4, 2005

I have a search form passing text from unbound controls to a query. These two fields (AuthorName & Title) of the query are from two different tables (Authors & Papers) set up in a many to many join. The 3 dummy records I am using are as follows:

Record 1
AuthorName: Smith (Author 1)
Title: SmithTitle

Record 2
AuthorName: Smith (Author 1)
AuthorName: Jones (Author 2)
Title:SmithJonesTitle
(i.e. two authors for this record)

Record 3
Author: Jones (Author 2)
Title: JonesTitle

If I stick in 'Jones' into the Author field and 'JonesTitle' in the Title field I correctly get 1 result from the query (record 3). However, oddly, if I put in Smith and SmithTitle I get two records (2 x record 1)!!!!! There aren't two records!!! Similarly if I leave both blank I get all the records and again there is a duplicate of the Smith record (and only this one is duplicated!)

The query criteria are:

[AuthorName] Like [Forms].[Search]![Author] & "*"
[Title] Like [Forms].[Search]![Title] & "*"

Any ideas???

Thanks

View Replies


ADVERTISEMENT

Annoying Problem.

Oct 7, 2005

Basically i have a form which logs error corrections. The users enter a 'date received'. My user has now asked to have a date due to automatically be calculated by adding six days. I have done this with no problem:

=DateAdd("y", +6, [date received])

My form is not unbound, this date due field is the only unbound field i have. This date does not need to be saved in the table, just to appear when the user opens the form, which it does.

The problem which i am having is that i have a report which runs of a query, printing out the error correction, when the user types in the auto number required. The records added after i put the date due field, will not print out and when i run the query and type in the auto number of these records they do not appear...yet they are stored in the table. Obviously this is due to the 'date due' field, but im not sure how.

I really don't understand what is wrong. Could someone please give me an insight into what maybe wrong or tell me what to search for in the forum, because the searches i have tried have not come up with anything.

Thank you

View 1 Replies View Related

Annoying Parameter

Apr 6, 2005

I have a SQL query in which I have created a parameter to be entered by the user.

This works ok, however... everytime the user is asked to enter the parameter twice...

How can I stop access from asking users the second time?

Cause... the way I see it, one time should be enough and the query itself doesn't state the line in which the parameter is twice either...

Thx!

View 5 Replies View Related

Annoying Combos

May 27, 2006

Hi There,
I know this subject has been beaten to death, but I have searched the forum and cannot find a post relating to my particular problem.
I have three cascading combos on a subform that work fine and dandy when I open the subform on it's own, but when I open the main form that the subform is embedded into, I get the following message [IMG]cascade[/IMG]
I know I am missing something simple.
Any advice would be most welcome.

View 2 Replies View Related

Annoying Query, Yet Simple? - Please Help.

Jul 29, 2005

Hi guys,

A friend of mine has recently created a simple database which holds details of childrens story books. It logs the name of the Author, the storyline, its character etc in various tables...

He's currently creating some simple queries for his database. However, there is one query which neither he nor I can figure out, I'll try to explain to the best of my ability.

Basically, the 'story line' field in his database explains the basic plot of the book, some of the plots have the words "son", "dad", "father" and "boy" in them.

Now, he wants to create a simple query, which looks up and displays data which contains the keywords "dad", "father", "son" etc in them. So far he's tried...

Like "*Son*" Or Like "*Father*" etc...

This worked, briefly. The query was bringing up storylines with both contained the words "son" and "father" , which is correct. However, the query was also bringing up story lines with the word "song" in them, or any word which remotely related to one of the keywords, but didn't contain the exact criteria in the query (son, father etc).

In basic terms, how do you create a query which only brings up words that match the EXACT query criteria? In this case, 'Son' or 'Father' or 'Dad' etc? Rather than words which only briefly relate to the criteria, such as 'Song' or 'Fat' etc?

Thanks for your cooperation, feedback and examples would be highly appreciated.

Thanks all,

Jonathan.

View 4 Replies View Related

Yes My Sql Newby Nuss Is Annoying =(

Nov 14, 2006

Heya, I know this is probably something simple as I know I have done sql problems like this before. However, I am wanting to show cars which have the same name but are of different colours (without duplicates), I figured I could just use a SELECT DISTINCT? However, when I do this it just brings up one car name and one colour when there are multiple colours.

SELECT DISTINCT car.carname ,car.colour
FROM cars;

I am guessing its because the SELECT DISTINCT statement is applied to both the name and colour.

If somebody could just tell me what I am doing wrong because I am guessing its something simple yet I am too frustrated to see what it is now!

Thanks =)

View 1 Replies View Related

Annoying Popup Messages

Jun 6, 2007

I have no idea wheather this is supposed to go in Queries or Forms, so feel free to move this to either.

Here's my problem:

I made a query that looks at three text boxes on a form. I'm not sure how to set up the buttons correctly so I just bluffed it (like always :) ). Every time I run the query it keeps wanting me to re-enter the data that it was supposed to look at anyway! If you need more info, just ask. Thanks.

Anonymous_354

P.S.: I'm really new at this. I just learned about Access a week ago.

P.P.S.: I use Access 2000

View 14 Replies View Related

Currency Field Formatting - Simple But Annoying Issue!

Jan 10, 2007

Hi All,

This is my first post so can I just say how great and useful this forum has been for me since I joined! I have found pretty much everything I have wanted without having to ask, so thank you everyone!

I am only beginning with Access at the moment, as I try to implement some improvements to the way my company works!

I have one really simple, but annoying issue at the moment and I cannot find the answer anywhere!

I have a currency filed in my table. I want to format it in USD, but USD is not available in the format options, just £ and €. I cannot see where the hell I get the USD $ format from?

I know this is probably well simple and I am being a plum!

View 3 Replies View Related

Duplicate A Record

Apr 12, 2005

I have a database with a table that uses a numeric field as a PK. If I use the built in "Duplicate" Command button on a form it creates an exact duplicate of the record, which then Access won't allow because the PK is no longer unique.

Does anyone know of a way that I could make the number be the max number + 1 when I click the "Duplicate" Button?

Thanks

View 1 Replies View Related

How T Prevent Duplicate Record Set

Mar 11, 2006

Hi All,

I have a recored set and i dont want a duplicate of the record set in the same table.

Say if my table name is businessskills and contains three fields(columns) and their names(Email , B_code, Rating) highlighted in red with data are as below

Email B_code Rating
hugh@hp.com b001 1
hugh@hp.com b002 3
hugh@hp.com b005 2
ston@hp.com b002 3
ston@hp.com b007 3

I have 5 recordsets in my table as shown above and i want to prevent any e duplicates.

Is this possible to implement to with excel vba code or directly in Access Database, either ways is fine with me.

Can any one please help me with this.

Thanks in advance

View 1 Replies View Related

Duplicate Record Error

Dec 21, 2006

I'm trying to make a simple DB that we can enter our time for working on projects.

So far I have a Form with the employees name and the date in it. Then below that is a subform with the project number, name, client name, and hours.

I want to use this whole "sheet" for one days worth of work for 1 employee. New sheets will be used for each day.

When I try to make a new sheet I get an error that it cant change the table because it would be creating a duplicate entry.

How do I solve this?

Also, should it be difficult to be doing what I'm trying to do?

View 2 Replies View Related

Duplicate Record Problem

Jul 13, 2007

The access table has one primary key StudentID which is indexed with no duplicates. (StudentID consists of schoool ID + an auto increment #)

When a second student is entered with the same name and birthdate into the table but with a different studentid the record cannot be saved as there is a duplicate value. If the birthdate is removed the record can be saved. If another character is entered after the first name with the birthdate the record can be saved.

I have tried adding time to the record, that did not solve it. I tried changing name and birthdate to index yes duplicates okay that did not solve it.

The only relationship is on studentid, I cannot understand why the birthdate is the problem when there is no relationship or primary key on that value.

Has anyone experienced this issue and can explain why access views this as a duplicate record when in fact it is not!

Thanks

View 5 Replies View Related

Duplicate Record Error

Aug 17, 2005

hi everyone,

i have a form that i'm trying to create a button to duplicate the record. i'm using the control wizard which produces the following code:

Private Sub DuplicateRecord_Click()
On Error GoTo Err_DuplicateRecord_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70

Exit_DuplicateRecord_Click:
Exit Sub

Err_DuplicateRecord_Click:
MsgBox Err.Description
Resume Exit_DuplicateRecord_Click

End Sub

When i try to execute the code via a comand button, i get an error and the duplicate record operation does not occur. one thing i noticed is that i have a lot of lookup fields (i.e. FK's to lookup tables one-to-many relationships) in underlying table being populated by the form. i've created combo boxes on the form to populate the FK's in the underlying table. the error that occurs when trying to use the above code produces a "paste errors" table and in that paste errors table instead of the bound column values from the combo boxes (i.e. PK values from the lookup tables) it shows the display values from the combo boxes. i'm not sure if this has do with anything, but i couldn't figure out why it was doing this.

does anyone have any ideas how i could get this duplicate record procedure to work?

many thanks for any help or suggestions.

View 1 Replies View Related

Duplicate Whole Record (in Form)

Dec 2, 2005

I have a form (with subform in it) and i fill it with different values. After some time, i need to fill another record (new one), with similar values.Is it possible to make a duplicate of my previous record, and put it in the "new record" so that i won't have to fill all fields again, only change excisting ones to different values.

Thanks

View 11 Replies View Related

Forms :: Go To Record If Duplicate?

Mar 13, 2014

On my form I've got an afterupdate event that checks if the information entered already exists and this works absolutely fine. However what I would like is the option to go to the existing record if one is found, but I can't get it to work.

This is my code currently;

Code:
Private Sub Job_No_AfterUpdate()
If DCount("*", "PACKING", "[Job No>]='" & Me.[Job No] & "'") > 0 Then
If MsgBox("Job Number already exists! Go to record?", vbYesNo, "DST PLANNER") = vbYes Then
Dim rs As Object

[Code].....

The check for the Job Number works fine but when I click Yes on the message box, the form stays on the current record instead of moving to the existing record.

View 14 Replies View Related

Duplicate A Record On A Form?

Mar 17, 2013

I am having trouble duplicating a record on a form. It gets tripped up on the phone number field ?????

The phone field has an telephone input mask. The error message is:

"The value you entered isn't appropriate for the input mask '99/99/0000;0_' specified for this field"

View 3 Replies View Related

Check For Duplicate Record By 2 Fields

Mar 12, 2007

dear all

i managed to get checking for duplicate record by ONE field ie member_no

code :

If DCount("*", "runner", "member_no = " & Me.member_no) > 1 Then
MsgBox " This member is already exist!" & vbCrLf
Me.c_memberid.SetFocus
Else
DoCmd.CancelEvent
End If


how i want to get checking duplicate record by TWO fields ie member_no and run_no ?


thanks in advance

View 1 Replies View Related

How To Delete Duplicate Record In Query?

Sep 1, 2005

Hi,
I have table tblSample (IdNo, SCode, StaffNo) where IdNo is AutoNumber. This is sample of data,

IdNo SCode StaffNo
10 ABC 50424
11 DEF 50424
12 GHI 50424
21 ABC 50424
22 DEF 50424
23 GHI 50424
26 ABC 50424
27 DEF 50424
28 GHI 50424

Is it possible for me to delete records from IdNo 21-23 and IdNo from IdNo 26-28. Any idea? Thanx in advance..;)

View 1 Replies View Related

Major Duplicate Record Problemo

Mar 6, 2007

Hello Forum,

I have a problem with duplicate records in my query. I know why the duplicate records are occuring and I have spent a ridiculous amount of time trying to fix the problem, but I'm really at a lost and am quite desperate for some help.

Here's some background info that shows the cause of the problem:
I have two tables. In the first table (tblMainData), there are three columns of interest (P1, P2, & P3). The second table (tblGroupList) has two columns (PN & GroupList). A relationship exists such that the data in "PN" is parital-text values of the data in columns "P1", "P2" and "P3".

For example, "P1" in tblMainData may contain "A1235XX". The "A1235" is what's important, so that's one of the values that I have in "PN".

Continuing, I have a user form that uses the "GroupList" field as the RowSource for one of my combo boxes (cboGroup), and this field contains an (ALL) option. So, when a value is selected from cboGroup, I use the following Criteria filter
Like [PN] & "*"
in my query (qryFilterGroup) to look for those partial text fields that match what's in fields P1, P2 and P3. The results are then shown in a subform.

Here-in, I believe, lies the source of the duplicate records. In my userform, if "(ALL)" is selected under the cboGroup combo box, a new record is created for each field P1, P2 and P3 in tblMainData that contains data and that is related to the partial text matching Criteria. A new field is created because each field corresponds to one of the values in the "GroupList" field.

This is really difficult to explain, and I don't really know if I should continue without writing a book. If someone or someone(s) could be so kind, please have a quick look at my attached database as it's obvious to see my problem. Any help is greatly appreciated!!

View 3 Replies View Related

Detect Duplicate Record Before Entering

Aug 16, 2005

I have a subform that collects the following data to put in a record in tblClass:

StudentID, Trimester, SubcatID, WorkGrade, SkillGrade

Before the record is written for the first time OR edited/updated to the table, I want to search tblClass and determine if the new/updated info will create a duplicate record.

In this specific case, a duplicate record will be defiened by a record where the only fields being considered would be StudentID, Trimester and SubcatID. The fields WorkGrade and SkillGrade should not be considered.

The code I came up with was the following and it was put in the BeforeUpdate:

Dim conn As ADODB.Connection 'Connection Object
Dim rst As ADODB.Recordset 'Recordset Object
Dim strSQL As String 'SQL statement for open statement

' Create object variables
Set conn = CurrentProject.Connection
Set rst = New ADODB.Recordset

' Create sql to search for records in tblClass that match
'studentID, Trimester, and Subcatagory in the form record being added
strSQL = "SELECT * " & _
"FROM tblClass" & _
"WHERE fldStudentID = " & StudentID & " AND " & _
"fldTrimester = '" & Trimester & "' AND " & _
"fldSubcatID = " & SubCatID & ";"

' Open recordset
rst.Open strSQL, conn, adOpenKeyset, adLockOptimistic

If rst.RecordCount >= 1 Then
' record already exists in tblClass
msgbox "Record already exists!",, "Duplicate Record Error"
Me.cboSubcatID.SetFocus
Cancel = True
End If

' Close and disassociate object variables
rst.Close
conn.Close
Set conn = Nothing
Set rst = Nothing


This code worked great except when I went to edit an existing record. When I went to change a grade (WorkGrade or SkillGrade) on an existing record, it told me that I could not enter the record because the record already existed (ie, the record I had open and was editing). I am not sure if it is my code that I need to edit or if it is the placement of the code I need to change.

Any suggestions would be great.

View 4 Replies View Related

Duplicate Record And Increment Several Fields

Jul 3, 2006

I have a document database that often deals with multiple copies of a document. Each copy must have a record of its own. With the add new record form I would like the user to be able to add the extra copies automatically by duplicating the first entry "n" times but also incrementing the copy number field by one for each copy. Got the duplicate copy done OK but am stuck on how to increment the copy number. This database forms part of my yearly assessment and is due in a couple of weeks so would welcome some help.

many thanks

View 1 Replies View Related

Preventing Duplicate Record Entry

Aug 23, 2006

Hi all,

I created a form for entering employee skillset in Accounting.

I have set up three fields - one for Primary Skillset and the other two for secondary skill sets -

The skillsets are -Payables, Receivables, General Ledger, Purchasing etc.

How can I ensure that a user will not enter duplicate values in the three fields.

That is a user will not enter for examply "Payables" in the Primary Skillset, and Secondary Skillset fields.

I tried creating a multiple field index but it does ont appear to work.

I will appreciate all the help.

Thanks

View 4 Replies View Related

Eliminate Duplicate Record In Combo Box.

Sep 15, 2006

Hi all,

This is an intersting question that my friend ask me... hope someone can help to solve it.

In a combo box i use to list out all the company in a table that with the duplicate of the company is allowed. Do someone have a good idea to filter the combo box when detect a duplicate data and just showing one of each company only? or can i create a query with just listing one of each company from the table with all those duplicate company data?

Thank you.

Regard,
alex

View 2 Replies View Related

I Need To Duplicate A Record Including The Subform

Mar 8, 2006

I want to be able to copy, or duplicate a record including all the associated records of the subform. The structure is the typical, ORDERS, ORDER DETAIL, PRODUCTS. I want to be able to copy a specific ORDER and generate a new one with all associates products. It would be nice to change one field (ORDER NAME), changing the ORDER name would simulate the "Save As.." command.

The end result would be a new Order identical to the first one (including all sub items) but with a different name.

Any suggestions?

Leonardo

View 2 Replies View Related

Duplicate Record With Auto Number

Nov 15, 2006

I ran into a weird task, sometimes at my job we have to use 3 identicle records where just one thing changes and that is the date. The thing that is giving me a problem is I get an error if I try to duplicate the record due to primary key being duplicated. I have a ID field which gives all records a number and when I try to duplicate the record I am in, I get an error because of the duplication of the ID Field. Is there a way to get around this?

View 6 Replies View Related

Modules & VBA :: Code To Take To A Duplicate Record

Aug 13, 2013

I have a form based on a query and have written code to display a msgbox if a duplicate entry is inputted in the NHS_Number field in the form. I have also added code "me.undo" to clear the form so that it is not saved. I am looking for a piece of code that will display the duplicate record. Here is my code thus far:

Private Sub NHs_Number_BeforeUpdate(Cancel As Integer)
Dim dbs As Database
Dim rst As DAO.Recordset
Dim x As Integer

[Code]....

View 4 Replies View Related







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