General :: Compare Data In A Column And Update If Required

Feb 28, 2013

I have a table "Customer Plans" with 100s of rows of data with 3 columns

'Name', 'Company', 'Plan Type'

I want to create a new column or table "Customer Details" with the the column name 'Customer' under the following criteria:

If the data in 'Customer Plans.Company' Column meets a certain criteria as in = "Corp&Gov" or "Head Office" or is "blank", I want it to populate the new column/table "Customer Details.Company" with the corresponding data in the 'Customer Plans.Name' column

e.g.
if
Name = Anna B
Company = Corp&Gov
then
Customer = Anna B

I want to populate 'Customer' with Anna B for that record and so on down the list of data in 'Company' column.

If however the 'Company' column doesn't meet the criteria, I want to populate the new column/table 'Customer' with the current data in 'Company'

if
Name = Anna B
Company = Dealer
then
Customer = Dealer

View Replies


ADVERTISEMENT

General :: Compare Two Tables And Update Changes

May 15, 2013

i import data into a Landing table, this will always contain d days woth of data, i then run an apend query into another table were the records are stored up to 20 days, the problem i face is some of the record data may change for eample a field called ShippedQty may be 0 in a monday but on tuesday it may say 5

Import on monday
Product ShippedQty Date
123____ 0 ________01/01/2013

Import on Tuesday
Product ShippedQty Date
123____ 1 ________01/01/2013

I need to look at any changes and updatein the master table, is there a way to do this.(I cannot change the import as its the only way i can get the data)

View 3 Replies View Related

Queries :: Single Row Data Required As Column Header

Nov 4, 2013

Is there any way I can use data in the row as a column header ? I only have 1 row of data which i want to use as a header to I can link it to other tables/queries.

(Access 2007 query)

View 1 Replies View Related

General :: Update Query Has Error 424 Object Required

Jul 10, 2013

I am trying to create an update query. I am trying to update a field in a table with the current date as a request.

I have a table named tblTest and a field named Date2 that I am trying to update with the current date, the button that the VBA is applied to is in a form name frmTest. This is my code:

Private Sub Command39_Click()
Dim t1 As Date
t1 = Date
db.Execute("update tblTest set tblTest.Date2") = t1
End Sub

But when I press the button I get:
Run time error '424'
Object Required

It highlights the 4th of code....

View 8 Replies View Related

Queries :: Run A Simple Update Query To Copy Data From One Column To Another Column

Sep 24, 2013

I am trying to run a simple update query to copy data from one column (Addrl1)to another column (Working_Addrl1) within the same file and I can't for the life of me figure it out. Then I need to repeat for addrl2 and addrl3 to working_addrl2 and working_addrl3.

View 7 Replies View Related

General :: Make Mainform Field Required To Enter Data Into Subforms?

Aug 7, 2015

I need to make my mainform fields required before any data can be entered into subforms. Mainform and Subforms are linked with LinkMaster Child ID. This should only be applied in this form.

View 4 Replies View Related

Modules & VBA :: Compare Column Names And Sequence

Sep 5, 2013

I want to be able to compare two tables to see whether their Column Names & sequence are the same.

View 1 Replies View Related

General :: Saving Data - Update Or Cancel Update Without AddNew Or Edit

Apr 13, 2013

My membership database has worked fine until recently. Now I cannot save inserted data. On attempted saving "Update or CancelUpdate without AddNew or Edit" appears.

The problem. relates to 2 tables Member and Addresses. PK in the parent table Member is ID. In the Addresses Table the FK is ID. There is a One to One relation between the tables and Referential Integrity is set. I know 1 to 1 is not good but it worked fine in this small database.

Browsing the all of the existing records is fine.

View 9 Replies View Related

Modules & VBA :: Use Different Column Based On User Input To Update Data

Jun 29, 2015

I'm attempting to build an import module so that my users can take data from different walks of life and import it into my tables. I'm doing this by setting up a module and allowing the user to specify which column data will come from when importing data. So lets say I have a field that is CustomerID in my table and user one pulls data from 1 place and in his excel or csv file, customerid is in field 1. Another user does the same thing and its in field 2.

How can i make some form of a loop that when I'm attempting to update data, i pull the correct column?

strSQL = "SELECT * FROM tblImportTable"
Set rst = db.OpenRecordset(strSQL, dbOpenDynaset, dbSeeChanges)
With rst
Do While .EOF = False
If IsNull(DLookup("DefaultValue", "dbo_tblImportTemplateDetails", "Template_ID=" & Forms!frmImport!TemplateName & " AND FieldName='CustomerID'")) Then

[code]....

View 6 Replies View Related

Compare And Update

Dec 28, 2004

I need to campare two tables. if there are new records from table A would like to add it to table B.
Also if there are any changes in a field of record i would like to see the change in table B.
thank you
Mark

View 1 Replies View Related

General :: Lookup Field - Adding Another Column To Enter Data

Aug 2, 2013

I have got a a form storing all employee's information and on that form I have a lookup field which looks up all the records in the "Qualification table" and the user can select multple qualifications. What I want to add to the lookup field is a data box so you can select a qualification and then enter the date that it expires (different for expiry date for each employee) How do I do this?

I have added the date field to the qualification table but when I create the lookup field on the form it shows the qualifications and a blank column next to it which data can't be enteed into.

View 2 Replies View Related

General :: Limited Size For List Box Column To Show The Data?

Feb 26, 2013

The column in my list-box did not show all the text i save in the table field. is there any limited size for list-box's column to show the data ?

View 2 Replies View Related

General :: Merging Data From Multiple Tables Into Single Column

Sep 10, 2012

I've created a access database containing multiple tables, theres one main table that will contain all the data compiled.

I then have other tables that contain some matching data but with an additonal column filled in,

I want to be able to pull the data from these other tables into the main table and compile it including merging some data into a single feild.

Effectively this is what the inputs will be:

Code:

Table 1
Ident Number Solution TRN
T0941A1 SLN019149 EFE0008
T0941B1 SLN019149 EFE0008
T0941C1 SLN019149 EFE0008

Code:

Table 2
Ident Number Solution TRN
T0941A1 SLN019149 EFE0167
T0941B1 SLN019149 EFE0167
T0941C1 SLN019149 EFE0167

Code:

Table 3
Ident Number Solution TRN
T0941A1 SLN019149 EFE0188
T0941B1 SLN019149 EFE0188
T0941C1 SLN019149 EFE0188

Then the main table i want to compile the data like this:

Code:
Table 4
Ident Number Solution TRN
T0941A1 SLN019149 EFE0008,TRN0167,EFE0188
T0941B1 SLN019149 EFE0008,TRN0167,EFE0188
T0941C1 SLN019149 EFE0008,TRN0167,EFE0188

i want it to show as 1 line item and compile the TRN numbers into a single feild per row rather than having duplicates.

View 1 Replies View Related

Update And Compare Table Records

Sep 1, 2005

Hi
I'm using MS Office 2000, I have an Access database table that contain many fields, namely I need to update FieldA from an Excel Spreadsheet according to the specified primary key of CustomerID. Is there a way to write automate process to import the records from an excel spreadsheet and then place those records in FieldA of the Access Database according to the corresponding CustomerID? The reason I ask is that these two fields are not exactly in the right order in my spreadsheet and my table and to do it manually will take lots of effort.

Your prompt response is greatly appreciated

Thanks

View 3 Replies View Related

Compare Value Before Running Update Query

Aug 31, 2006

Hi all
I want to view vehicles due for servicing in the next week. The queries giving me this information work fine. I have a form that I can select, from a drop down box, either 1,2,3 or 4. A report is then run and emailled to the appropriate people. After testing to see what was the easiest way to remember what the last week was (I tried setting the combo box to remember the value but it did not, unsure why, I also tried recording Mondays date in a field in a table and assigning each Monday a value 1-4 then running a query...long story short, to time consuming) I have used a table with one field to hold the value and after emailling the report, an update query adds one to this field and it is displayed above the combo box in a txt box. I want to reset the value to 0 if the value equals 4 before the update query runs. Is this the best way to do it or can someone suggest another way of doing this.
Thanks in advance
Craig

View 2 Replies View Related

Update Several Fields And Compare Strings

Aug 8, 2007

Have devloped a database to log all support issues for an application I work with.

I periodically update the database by importing from another database

for example my main table tbl_issues has fields IR_NO, DESCRIPTION and STATUS

I then import data from tbl_import which also has these fields. The following query works fine:

UPDATE tbl_support
SET tbl_support.STATUS = tbl_import.STATUS
WHERE tbl_support.STATUS <> tbl_import.STATUS
AND tbl_support.IR_NO = tbl_import.IR_NO

However I also want to do this at the same time:

UPDATE tbl_support
SET tbl_support.DESCRIPTION = tbl_import.DESCRIPTION
WHERE tbl_support.DESCRIPTION <> tbl_import.DESCRIPTION
AND tbl_support.IR_NO = tbl_import.IR_NO

How do I update both fields at the same time?

View 2 Replies View Related

General :: Changing Column Colour In List Box - Alignment For Cells Data

Jan 7, 2014

How can change column color in list box and also how to make alignment left or right for cells data.

View 1 Replies View Related

Queries :: Compare A Field In Another Table And Update Accordingly

Jun 25, 2015

I am programming an Acess Database, the primary data come from an excel sheet. Since Access one to many relationship only works for primary key and another field in another table as foreign key, I can't have normalized database.

I will explain what I mean with a hypothetical situation.

So, let's say I have two tables: WindowT1, CustomerT2.

WindowT1 has fields: WinID (the pk), WindowName.
CustomerT2 fields include CustID (pk), CustomerName, WindowName, WinID.

So, in table "CustomerT2', WinID is the foreign key and I need that field filled in to make one-to-many relationship between these two tables to work. CustomerName and WindowName will be imported and prefilled already from an excel file with append query.

My question is can I make a update query (after the initial append query that brings in the data into Access) such that the criteria is matching WindowName (from CustomerT2) and the update would be the corresponding WinID (the pk number from WindowT1) that would be filled in the field WinID (in CustomerT2)? I know for this to work tables must have relationship and I did that.

Is there a better way to accomplish this task? i.e. through a form (remember info will be prefilled, so can't use combo box to fill in another form field) or maybe can I do this using the first append query (that brings in data)?

I am not good at Macro or VBA. The only thing I have done in code builder is After Update event in forms while using combo boxes. So, if there is no easier solution, I will try to deal with codes.

View 11 Replies View Related

Update Required In A Text Box?

Jan 9, 2008

Hello everybody

Hope all is well! I have one text box among others in a form that require the user to update data in that particular text box every week. I already put a msgbox in the Textbox_On Got Focus to remind the user to update the data. However, the user still can ignore and move on to others text box. Please advise HOW to FORCE the data to CHANGE/UPDATE something in that text box.

Thank you so much for all your help!
Regards,

View 2 Replies View Related

General :: Can't Change Listbox Column Header Name When Data Source Is A Share-point List

Jul 30, 2013

The following code works to change the column header name for a listbox in form view when the data source is a local table, but not when the data comes from a sharepoint list.

Code:
sqlstatement = "SELECT ID, PONum as [PO Number], ActDate as [Date], VendorName as [Vendor Name], Service, BuildingNumber as [Building Number], ReservationDescription as [Description], POAmount as [Amount], QuoteType as [Type of Quote], Comments" & _
" FROM ActivityLog" & _
" WHERE (Activity = 'AcceptReservation') AND (PSCName = '" & Me.PSCCombo4.Column(0) & "')" & _
" ORDER BY ActDate;"
'MsgBox sqlstatement
Me.EditPOListBox.RowSource = sqlstatement
sqlstatement = ""

Also it appears that there is no such thing as a caption property for a sharepoint list column.

View 3 Replies View Related

Modules & VBA :: Update A Column With Its Last Value And Concat To Value Of Another Column

Apr 16, 2015

DoCmd.RunSQL (" update tbl_userinformation SET [05-Henrichpiramid] = Yes where Username= Text146.value AND actualdate=Text148.value ;")
DoCmd.RunSQL (" update tbl_userinformation SET [combination] = [05-Henrichpiramid] where Username= Text146.value AND actualdate=Text148.value ;")

i want to update the column combination to its last value with concatanation to the value of current column.

View 11 Replies View Related

Forms :: Form Field Required After Update?

May 13, 2013

The data base I'm creating deals with Account numbers, I have a check box asking the end user what type of account they have Cell or no Cell, If they check yes to cell two other check boxes come up Primary/Backup.

Private Sub Cell_Account_Click()
If Me.Cell_Account = True Then
Me.Primary.Visible = True
Me.Backup.Visible = True
Else
Me.Primary.Visible = False
Me.Backup.Visible = False
Me.Primary = Null
Me.Backup = Null
End If
End Sub

I would like to make it so that when clicking the Cell Account that it's required to select one or the other Primary/Backup?

View 14 Replies View Related

General :: How To Compare Strings

Aug 23, 2013

How to compare 2 strings in Access in order to determine one is biggest or highest than the other??

View 2 Replies View Related

General :: Update Form With Data From Search Box

Oct 7, 2013

I would like to make a search box and update my form with the person's data from the search box.

View 5 Replies View Related

General :: How To Compare Sum Of A Few Numbers From A Set Against A Given Number

Nov 1, 2012

I have a set of numbers, say (these could also be values of a column in a table)

FieldA = { 11, 16, 20, 23, 30, 37, 40, 50 }

I have a number, say 196.

I want {16,23,30,37,40,50} to be returned as these numbers add up to 196.

Note :
1) There is no possibility of two solutions with the kind of numbers that I may be using.
2) A solution using excel is also OK, though, personally I would prefer access.

Edit :
3) {16,23,30,37,40,50} - Each value is a separate record i.e. they are not in a single field, rather :
16
23
30
37
40
50

View 12 Replies View Related

General :: Slow Searches After Update To 2010 Data?

Apr 16, 2013

I have a big application, which we updated to Access 2010 a month ago. It ran fine. Then we also just updated the data from 2003 to 2010. Now we have very slow searches of big tables/queries, and the tech says that 'cpu usage on the server has gone to 100%'.

What can be happening? Nothing else has been changed except that the data has been updated to 2010 accdb.

View 3 Replies View Related







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