General :: How To Create Form / Code For Viewing And Consolidating Duplicate Customers
Apr 8, 2014
I have a database with customers/orders etc. I need to create a form or something which will show if a duplicate customer is entered. I know about the duplicate records query wizard, but I also need an easy way to consolidate and delete records. When a duplicate customer is found, move the customers order/s [OrderNumber] to the existing customer and delete the new/latest customer record.
Customers are in tblCustomers, their orders are in tblCustomerOrders, [CustomerNumber] is the joining field.
I was thinking of just a date/time field for [DateCustomerEntered] with default value Now to keep track of the later customers?
View Replies
ADVERTISEMENT
Apr 10, 2014
I have a few duplicate customer queries (different duplicate fields etc). I would like to construct a form to make it easy for an end user to remove the duplicates.
The main problems are...
1. the newer customer is to be deleted
2. any/all orders from the newer customer will be moved to the older customer before deletion.
3. preferably an easy way to switch between the duplicate queries in the same form, though if this is a problem I could just have one small dialog box/form, linking to 3 different duplicate query/forms.
I think other changes between the customers will be easy enough to just do in the subform, i.e update email address/tel/status/salesperson etc. These can just be edited directly?
But the transferring of orders can't be edited directly because there may be several orders and could be errors etc.
tblCustomers [CustomerNumber] primary key
tblCustomerOrders [OrderNumber] primary key
[CustomerNumber] linking to tblCustomers
So all that needs to be updated is [CustomerNumber] in tblCustomerOrders. All orders for the newer customer to have the CustomerNumber field updated to match the older customer. Then the newer customer is deleted.
I would just have a button with a message box to run the code, update CustomerNumber/s and delete record.
View 2 Replies
View Related
Jun 11, 2013
I've got a table which lists accounts with an associated charge. If the account has multiple charges, then the account appears multiple times, for each charge. I'd like to consolidate the duplicates without losing each charge that is associated with the account.
View 4 Replies
View Related
Jan 14, 2007
I protect my code from people being able to read it by setting a password on the code from Tools > Properties, selecting the Protection tab and entering a password, and clicking "Lock Project"
Is there a way to write code that will remove that Lock Project check and check it back on?
I've looked through the Application.SetOption command and it doesn't seem to be one of the choices. It would be very helpful if someone knew how to do this.
Thanks
SHADOW
View 6 Replies
View Related
Aug 1, 2013
I have the following tables in my Access database.
A < B < C < D
(The "<" represents a one to many relationship.)A given row in table A can have up to 4 children (stages) in table B (stages 1 to 4).The other one to many relationships do not have any limitations as far as the number of children are concerned.All tables have AutoNumber primary keys.When the user clicks a button in a form, I want to:
Copy all data in the current stage (current row) in table B (corresponding to a given parent row in table A), to the next stage in table B.All data in child tables must be included in the copy process.In other words, for a given row in table A, by use of buttons in the forms for each of the stages 1 3, the user shall be able to do the following:
all data for stage 1 are copied to stage 2 (for user modification), then
all data for stage 2 are copied to stage 3 (for user modification), then
all data for stage 3 are copied to stage 4
Is it possible to do this in Access 2010?
View 4 Replies
View Related
Mar 21, 2014
See attached picture where I am stuck at?
I have a table that holds UK Postcodes and a customer table that holds customers.
I am trying to create a relationship between the 2 so when I enter a postcode in the customer table this is then related to the postcode table.
The main problem I have is that there is a lot of duplicate postcodes in postcode table so the primary key is simply a number as you will see in the picture.
View 2 Replies
View Related
Sep 2, 2013
I am trying to create a duplicate of a certain record in a table so that the user can then edit the new record - or old record even as it doesn't matter - as long as one of them is original. The idea is that any revisions / changes are stored the user may of made.
View 2 Replies
View Related
Jun 4, 2014
I have an issue with a code that I have in a form which adds rows in a table as many times as categories chosen from a list. However, the code is not working correctly: it adds the information and creates a row with a category in blank, in addition to the rest of the rows with one of the chosen categories. I would like for this not to happen, to add only as many rows as the categories chosen.
My code is the following:
Private Sub cmdUpdate_Click()
Dim valSelect As Variant, MyDB As DAO.Database, MyRS As DAO.Recordset
Set MyDB = CurrentDb()
Set MyRS = MyDB.OpenRecordset("Tasks", dbOpenDynaset)
MyRS.MoveFirst
[Code] .....
View 6 Replies
View Related
May 21, 2014
I'm trying to make a query to filter or show only those customers when it is the time for their monthly payment.The query I have consists of four fields which are
1- Order ID
2- Payment
3- Date (Default value set to Date ())
4- Date for next time Payment (Default value set to date () + 30)
I made another field called "states". In this field I putted the following expression
Code:
IIf(([Date for next time Payment]-Date())= 0 "Should Pay";" ")
Then, I set the criteria for such field to "should pay" so that only customer "should pay" will appear in the query datasheet. However, this method has the following shortcomings:
1- It works only for one day (alert day) ,i.e., customers will filtered only when the expression is true.
2- Customers who have paid will still appear as a "should pay" until the day (the day that make the expression true) finish.
3- Customers whose pay late (maybe after 1 week) will disappear form the query datasheet after alert day finish.
To overcome the above shortcomings, i modified the expression to
Code:
IIf(([Date for next time Payment]-Date())<-1 And ([Date for next time Payment]-Date())>-15;"Should Pay";" ")
This method will extend the alert duration to 15 days, so the customers who haven't pay yet will appear in the query datasheet for 15 days. However, the customers who have payed will appear also, and that is the problem. The problem here is I can't compare the current payment date with previous one for one customer. method to create suitable expression, or even another query scheme ??
View 1 Replies
View Related
Mar 7, 2014
I am in the process of putting together a database for use in a hotel to log details of customers, enquiries, and sales.
I have one table for storing customer contact details in ("Customers"), another table for storing enquiry details in ("Enquiries") and a third table for storing sales data in ("Sales").
Each record in Sales is linked to a customer from the Customer table, so with a simple query you can see what any given customer has spent their money on.
My boss would like to have a list of who her "top 10" customers are, over a given period, so she can work out who spends the most. I was wondering if there is a simple way to do this?
The only way to do this that I can think of is to run a query for every customer (to isolate their sales data), use the total function to add their sales together, note down the total, and input into excel (to work out the ranking). However, seeing as we have been collecting data for around a month now and have around 400 customers in the database this would clearly take a very long time. Is it possible to automate this process?
View 3 Replies
View Related
Jan 17, 2005
I have a date field set up in my form but I want to be able to make a numberical entry of 010105 and it convert to 01/01/2005. How do I do this?
View 2 Replies
View Related
Jul 28, 2014
In MS Access i want to be able log jobs and be able to assign my stock to the jobs i have logged is this possible ? how to create a database to log jobs but how can i make it so when i add stock to the job it will remove it from my stock pool and assign it to the customer thus taking it out of stock.
View 3 Replies
View Related
Jun 1, 2015
I used to have a handy tool called LDB Viewer or something like that with which I could see who is using my database. Now I've upgraded to MS 2010 is there a way to do the same?
View 10 Replies
View Related
Jul 20, 2015
I am building a database in Access 2007 that needs currently includes images and excel files as embedded OLEs. I am aware this is not ideal, but I can't change my employer's mind.
I've been looking in to the Attachment data type but am having trouble deciding if it will work as a substitute for my purposes. I know a variety of image file types can be displayed inside Access on forms and reports, but I can't find anything about displaying the contents of an excel sheet. I read something about using Active X controls to display .pdf images - is there anything similar for Excel?
View 7 Replies
View Related
Nov 3, 2013
I want to develop my database and forms to fit a 1600 x 900 resolution screen and would like to know, whilst I am in the Developer mode of Access 2007, is there a key that I can press that will switch to display the database/forms so that I can see what the User will see?
View 2 Replies
View Related
May 1, 2012
Here is what I am trying to do: I have form, and a table which is created from this form. The data is entered a second time using the form to make sure there are no discrepancies.
Any easiest way to implement this? (create a new table (which is duplicate), and then compare them?
View 5 Replies
View Related
Sep 20, 2012
need information in form to write to report before accepted and saved to separate table, so operators can read it. background:manifest information entered into form in receiving office, analysis ran in lab and then entered into form. When analysis is approved, Operators unload material then truck checks out in receiving office. Need to see analysis before it is written from load_temp table to Load table.
View 1 Replies
View Related
Jul 11, 2013
I have form "frmOrders" (Datasheet), columns: "id_order", "nameOfOrder", "worker", "term", "changes"I don't know it's possible or not.
e.g. I have in some record values like this
Id_order - 2
NameOfOrder - folder
Worker - John
term (this field is empty)
some day I will change e.g. nameOfOrder from "folder" to "business card" and term from empty to 2013-07-13. So two records was changed. After changes, record "changes" should has value like this "folder; term" - because I changed these columns.
View 5 Replies
View Related
Aug 28, 2014
Users are too lazy to check whether a patient record exists or not. Consequently, we have a number of duplicate records that I would like to merge.
My problem is finding a way of linking 2 subforms to a parent that is not based upon a query.
On the parent form, I want two Comboboxes called 'Patient_to_Keep' and 'Patient_to_Discard'.
The two subforms called Frm_DUP_Patient1 and Frm_DUP_Patient2 should then display the data of the respective combo boxes.
Once I have this working, I can write the necessary code to compare and update the data as required.
View 5 Replies
View Related
Oct 24, 2007
Hi,
Well I know why this happens b/c the table that the information is being pulled is the subsequently being updated however when moving to a diff customer or closing the form etc.. The user is then displayed the MsgBox of Write Conflict and supplying the user with 3 options of Disregarding Changes, Saving changes to Clipboard or Save Changes.
Baisically is their a way to restrict this write conflict msgbox and have it so that it saves the users changes every time.
cheers
monkey o_0
View 2 Replies
View Related
Aug 10, 2013
I am trying to create a user form with sub form using the form wizard. I have only 2 tables, Employee (main table) and Vacation (subform table). I pick the fields from Employee Table then fields fro Vacation, but the wizard treat the Vacation as main form and Employee as sub form.
View 4 Replies
View Related
Sep 18, 2005
Hi
Please help. I have create the below code in red but what is the mistake.
If DCount("[product_code]", "PRODUCT MASTERLIST", "[product code]"= " & Me.Product_code& "'") Then
MsgBox "This Product Code has already exists!!"
Cancel = True
Me.Undo
Exit Sub
Else 'Do nothing
End If
Thank you
View 5 Replies
View Related
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
Feb 19, 2013
I have a table that has 1335 records in, and columns names, Title, First Name, Surname, Address, Address2, Town/City, County, Postcode.I want to know how to write a SQL code, which will locate all the duplicates that match the First Name, Surname and Postcode and delete them, but keeping 1 copy of the duplicate.I have created a query to locate the duplicate records, and I have put the SQL code there. I tried changing this, however it would delete all the records, so I am not to sure what to try...
SELECT SurnameSearch.Title, SurnameSearch.[First Name], SurnameSearch.Surname, SurnameSearch.Address, SurnameSearch.Address2, SurnameSearch.[Town/City], SurnameSearch.County, SurnameSearch.Postcode
FROM SurnameSearch
WHERE (((SurnameSearch.[First Name]) In (SELECT [First Name] FROM [SurnameSearch] As Tmp GROUP BY [First Name],[Surname],[Postcode] HAVING Count(*)>1 And [Surname] = [SurnameSearch].[Surname] And [Postcode] = [SurnameSearch].[Postcode])))
ORDER BY SurnameSearch.[First Name], SurnameSearch.Surname, SurnameSearch.Postcode;
View 1 Replies
View Related
Aug 2, 2014
What I am trying to do, is create a time billing form to track time spent on different tasks, with the following items in a neat form, in this format:
1) Client
2) Employee
3) Rate/hour
4) Date
5) StartTime
6) EndTime
7) BillableHours (*)
I am able to make a form that correctly works lets the user enter records for 1-6, with the user pressing crtl+shft+; to give the correct starttime, and then at the end of the task, the user can press the same and register the end of the task.
My problem is that I can't work out how to calculate 7) as one needs to input some VBA code that converts date/time to numeric values, allowing you to calculate time difference. However, I simply don't know; a) the proper 'code' that will calculate the time different between 5) and 6). I saw that it was perhaps the dateDiff command? And b) where I would even put that code into, i.e. the exact location where one goes to and types the code into... Is it a query? Do you set it to a Calculated value in the table editor?
View 7 Replies
View Related
Apr 22, 2014
I am trying to create a form for data entry. I would like the Total Balance in the last record to become Total Cost in the new record. However, if the total balance in the previous record is =<0 it prompts the user to enter a new total cost else use the last Total Balance. The form in question is FrmSubClients in the attached file.
View 4 Replies
View Related