General :: Concat Fields And Insert Text

Nov 6, 2014

In Excel I can do the following;

Field A Field B Result
Chips Fries Replacement of 'Chips' with 'Fries' on menu.
(null) Fries Addition of 'Fries' on menu.
Chips (null) Deletion of 'Chips' on menu.

Can I do this in Access using some form of append query?

View Replies


ADVERTISEMENT

Concat Fields

Nov 19, 2007

I have a TableA and one of the fields is FileName (filename1.mpg, filename2.mpg...).

On a Form, I have a box and I want there to have this string for the first row:
"/VIDEOS/filename1.mpg".

How can I do that? THANKS!

View 5 Replies View Related

Queries :: Insert Multiple Groups Of Text Fields In Table

Feb 17, 2015

I am trying to do is to make a for loop to insert multiple text fields in on table.

Depending on the counter (Zaehler) it should insert that representing text field. for example if Zeahler is 1 it should input whatever is inside the text field KVP_Kfm1 if its 2 then it should input the textfield KVP_Kfm2 and so on. here is the code that I'm trying to work but sadly it wont.I believe that the mistake is that my syntax is wrong but i cant figure out what is right.

Code:
For Zaehler = 0 To (Forms!frmCMP!txtAuslaufjahr - Forms!frmCMP!txtAnlaufjahr)
SQL = "INSERT INTO tblLifecycle_Projektion(ID_Berichtstand, KVP_Kfm, KV P_technisch, AeJ, MoPf, skAe, MiBst, Sonstige_Effekte, " & _
"KVP_technisch_FTR, KVP_Kfm_FTR, AeJ_FTR, MoPf_FTR, sk Ae_FTR, Sonstige_Effekte_FTR, Jahr) VALUES " & _

[Code] ....

View 3 Replies View Related

General :: Linked Fields Insert Record Number Not Value

Jul 30, 2012

I have three tables which I have linked with relationships. The linked fields are given the ID number of the parent, where I wanted the value. What on earth am I doing wrong, something stupidly obvious I bet! Access 2007

View 3 Replies View Related

General :: Using Check Box To Grey Out Certain Text Fields

Oct 24, 2013

I am trying to use a check box to either grey out certain text field(s). For example If the box is checked true then certain fields would become available to input data. If the box is not checked it stays grayed out.

View 8 Replies View Related

General :: Alignment Of Text In Form Fields?

Jun 24, 2013

I have a form with many fields on it. For some reason some of the text in the form fields don't line up vertically with other text even though I have aligned them to the grid and to each other. I have Access 2013.

View 14 Replies View Related

General :: Concatenate Two Text Fields Into A Memo Field In Query?

Sep 5, 2014

I'm trying to concatenate two text fields into a memo field using an expression in a select query. My problem is that the text fields together end up more than 255 characters, so I need the resulting field to be a memo instead. I can't change the underlying text fields to memo fields because this is a large database used by others who need those fields to be text.

View 3 Replies View Related

General :: Append Validation Rule Errors (Using Text Fields)

Jul 27, 2015

Many times I have appended tables. But now I am struggling even trying to append 4 fields defined as text.

View attached zip file.

View 8 Replies View Related

General :: Specific Text Display In Field Separated By Commas When Fields Checked

Aug 11, 2012

I have a few bit fields that, when checked, specific text need to be displayed in a field separated by commas.

Example:
Child 1 = checked
Child 2 = not checked
Child 3 = checked
Child 4 = not checked

Output:
Child 1, Child 3

I did find this sample expression that I am using in another area and it is working perfect and I understand it works based off of string length.

Mid(IIf(Len(Expr1), ", " & Expr1, "") & IIf(Len(Expr2), ", " & Expr2, "") & IIf(Len(Expr3), ", " & Expr3, ""),Len(", ") + 1)

What is the best way to accomplish this?

View 4 Replies View Related

Concat Using

Apr 6, 2007

I have a table:
id date status
====================
1 03/01/2006 W
1 02/01/2006 L
1 01/01/2006 L
1 31/12/2005 W
...
2 03/01/2006 L
2 02/01/2006 L
2 01/01/2006 W
2 31/12/2005 W
...
3 03/01/2006 W
3 02/01/2006 W
3 01/01/2006 W
3 31/12/2005 W
...

What I want is to concat the field status showing the latest 5 results, like this:

id status
=========
1 WLLWL
2 LLWWL
3 WWWWW

I have tried to use concat, but i can't get the desired one. Any idea to do that?

Thanks!

View 3 Replies View Related

Concat Two Int Columns Into One

Jul 17, 2007

I got a access SQL question.

Let's say we have two int columns, I want to get the results Column1 + Column2 in string format

i.e

Column1 - Column2
5 - 2
6 - 2.5
10 - 6.5
10.5 - 8


I need to return the data as new column like:

NewColumn
"5 to 2"
"6 to 2.5"

so on

SQL + operator only works for string operation, how would I use it for numeric data type.

Thanks a bunch
shazaduh

View 2 Replies View Related

Last Name / First Name Concat Field

Jun 5, 2013

I am having trouble concatenating a field from an employee table where the format is "Last name, a comma, a space, first name." I attached a screen shot of my database.

View 2 Replies View Related

Slow Concat Function

May 2, 2008

Please see attached Sample,.

This may look like its fairly quick,.. but its the slow as hell,.. across the network "front end back end" especially when cross referencing againts qty's already ordered. "not included in sample"

I have only attached a basic sample of the query with some data, on my full system this acts very much like a Dlookup would do on a continuous form. "if you were foolish enough to use one there"

Check out the module for the code

My Question is: Is there an alternate "Speedy way" to produce the same results as seen in the sample.


To explain more,.. this is what i have and works fine,..."except having to wait a minute for the concat" which as you can imagine is very irritating for the user,.. when they have many lines to purchase.

When a job is created item required to be purchased are put in the Requests Table

Code:Tbl_03_RequestsID #Part NumberDescription StatusQty ReqUOMPriorityReq #Work Order1114N4082-6Leading Edge SkinStock Required1eaPriority 1WO07-421

Often the same part is Required on a different job,.

Code:Tbl_03_RequestsID #Part NumberDescription StatusQty ReqUOMPriorityReq #Work Order50114N4082-6Leading Edge SkinStock Required1eaPriority 1WO07-690

A query then creates a list to purchase

Code:ID #Part NumberDescription StatusQty ReqUOMWork Order1-50114N4082-6Leading Edge SkinStock Required2eaWO07-421 - WO07-690
The ID is then purchased against on the Order Screen

The Id goes into the purchase order table

The Id is then Split back down to its original numbers

The original numbers then look back at the Request table and update the status to Ordered

Code:Tbl_03_RequestsID #Part NumberDescription StatusQty ReqUOMPriorityReq #Work Order1114N4082-6Leading Edge SkinOrdered1eaPriority 1WO07-421


Code:Tbl_03_RequestsID #Part NumberDescription StatusQty ReqUOMPriorityReq #Work Order50114N4082-6Leading Edge SkinOrdered1eaPriority 1WO07-690

And so on,. When the unit is received it changes the status to received.

I can't do this with a temp table,.. that will take a bit of explaining so please take my experiance and word on that.

Sorry about the Table Formatting,... Is there another logical way to do this.

View 5 Replies View Related

Modules & VBA :: Add Currency Format To Concat String

Jan 20, 2015

I have a Concatenate string of text and currency. When joined together, the currency format disappears. I need to reformat so the string stays together with new format. Below is what I have:

Public Function ConcatAgreementFundsCommitted(ID As String) As String
'/ Purpose: Generate a concatenated string of Tracks for selected line.
On Error GoTo Err_Handler
Dim lngLen As Long 'Length of string.
Dim strOut As String 'Output string to concatenate to.

[code]....

I need 'Funds_Committed' to display as currency.

View 2 Replies View Related

Short Cut To Insert Text

Nov 17, 2005

Is there a way to assign some short cut controls that will insert certain text into the field the cursor is in? For example, is there a way to assign "No mustard" to Alt-M?

View 2 Replies View Related

INSERT INTO With Date Fields

Sep 10, 2013

I have an insert into statement this involves inserting values into date/time fields. I understand the a '#' has to come before and after the value, and when all values are populated this works great.

Code:
INSERT INTO TableName VALUES (#1/1/2013#,#1/2/2013#)

However, what about in the case of Nulls? The resulting statement then looks like the following. This results in the statement trying to put a '##' in the table and it doesn't like it.

Code:
INSERT INTO TableName VALUES (#1/1/2013#,##)

I am trying to input records into a local Access table, not a SQL table.

View 1 Replies View Related

Insert A Select Statement In A Text Box

Aug 1, 2006

hi guys. i was hoping you guys could help me, i have a combo box "cbocontract" which gets populated according to a selection from another combobox(cboAll). now i have another combo box(cboStatus) which according to what the user selects in cbocontract list box it should display active or inactive, now i have the row source from the cboStatus like this:

SELECT DISTINCTROW Test.Status FROM TEST WHERE (TEST.Facility=forms![Change of Status]!txtInvoice.value) and (TEST.PM_Contract_ID=forms![Change of Status]!cboContract);

it works perfectly, however is there a way to make put this code in a text box? how do i insert the select distinctrow into a textbox??? it should only display one value according to what the user selects in the cbocontract combo box... also, the user should be able to edit this textbox.

:o

View 4 Replies View Related

Insert Multiple Values Into A Text Box

Apr 9, 2007

Hi All

I have a list box. Below it lies a text box.

I'd like to click on multiple values in the list box which then populates a text box with each value to form a sentence.

currently my code looks like this

Dim Comment As String
Comment = Me.lstComments.Column(0)
Me.txtComment = Comment

Using the above method only inserts one value. How can I modify this to insert multiple values into the text box?

Much appreciated

View 4 Replies View Related

Calculate Text Box And Insert To Field

May 15, 2012

i have 1 table name "table1"and i have in this table 4 fields

1) id
2)pay
3) tax
4) total

The id is primary. I have form in this form i have 3 text box "pay" "tax" "total". i want to insert some number to pay and number to tax and make some button to make calculation of the 2 text box and it will show me the result in the total and insert them to the fields.

View 3 Replies View Related

Modules & VBA :: INSERT With Optional Fields?

Jun 5, 2013

I currently have a bound form that adds a new student, however, I've decided I don't like bound forms as weird stuff can happen (like when the user exits in another way than I anticipated) so I'm making an unbound form which will add the student when a button is clicked. I already have this working on some other places so this should be no problem anymore.

However in my database a lot of student information is optional and only a first and last name are required (and ofcourse an autogenerated PK). So my question is how do I deal with these fields that might or might not be empty?

I could make a fairly big If ... ElseIf... construction where I slowly fill a String with all the optional fields but I was wondering if maybe there are some better ways to approach this?

View 12 Replies View Related

Insert Current Date In Text Box On Got Focus

Apr 3, 2005

I have a form with two text boxes in which I would like to insert the current date automatically when the text box has got focus. Default value doesn't work because the current date may occur on two different days, and the default has to be null until the current date is inserted.

Can someone walk me through the process? Thank you.

View 3 Replies View Related

Using A Combo Box To Insert Text Into A Form Field

Oct 9, 2005

This is really hard to explain, but basically I'm trying to use a combo box that has a control source different than it's record source to update another field on the record source. For example, the combo box pulls it's options from a table called "NameList" and when you select an option from the combo box it updates a table called "Results". On this form there are form fields that are bound to the "Results" table. What I want to happen is, when I make a certain selection from the combo box, I want one of the fields bound to "Results" to automatically display text from a different table. Is this even possible? If this is a horrible explanation, please let me know. I need serious help on this one, I've been working on this for a day and a half now. If anyone has any ideas on how to do it a different way, please make suggestions. Thanks in advance!

- Josh :confused:


Also, another thing I forgot to mention, this may help anyone who tries to help me. This "Results" form is basically used as a log utilizing a report to display a sequence of events. I've included a screenshot for visual affect. I have censored a few things for privacy reasons.

View 2 Replies View Related

Insert Date At Beginning Of Text Field

Mar 14, 2006

I have a text field called Notes - where we will add notes about the particular job. What I want to do is have it a locked field with a button 'Add Notes'. When clicked it will insert the date and the user name of the person and then let them type the notes. When they move to the next record - I want that field to be locked again.

I've got some of it down but still not right. I can get it so it inserts the date but it overwrites what is already there. How can I get it to just add the data - not overwrite? And I can't get it to lock when they move to the next record.

Any help would be appreciated.

Thanks,

Jason

View 3 Replies View Related

VBA To Find First Empty Cell In A Row And Insert Text

Sep 20, 2012

I'm using Access to export the results of a query to Excel and within the same code I am opening up the spreadsheet to format it. Part of the formatting requires me to find the first empty cell in column A, and then insert the text 'Summary'.

Within Excel, the following code works:

Find empty cell:

Code:
Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select
Add term 'Summary' to cell:

Code:
ActiveCell.FormulaR1C1 = "Summary"

I've tried a few different things based on some code I've found on the net from similar situations, but in just about all attempts I get an object defined error. I've tried dimming the piece of code as an object, but when it comes to VBA, I'm just fumbling through.

View 1 Replies View Related

Modules & VBA :: Insert Query Not Populating New Fields

May 29, 2014

I have an insert query that has been working just fine. I added three new columns (Paid, Balance, Invoiced) to both tables that I am using in my query. The query will insert the new records that don't exist in the one table just fine but it is not populating the new columns.

' Append records from aud_ck_reg (local table) to dbo_aud_ck_reg (table on server)
DoCmd.RunSQL "INSERT INTO dbo_aud_ck_reg ( audType, audDate, audUser, transid, customer_number_parent, transdate, create_1131, check_number, check_date, PW_voucher_date, " & _
"voucher_date, voucher_number, customer_number, credit, debit, fiscal_yr, month_number, calendar_month, calendar_year, calculated_cost, notes, CIT_number, Quarter, Hyperlink, Paid, Balance, Invoiced)" & _
"SELECT aud_ck_reg.audType, aud_ck_reg.audDate, aud_ck_reg.audUser, aud_ck_reg.transid,

[Code] .....

View 4 Replies View Related

Modules & VBA :: Insert Fields From Subform Into Database Using SQL

Mar 8, 2015

I am trying to formulate some code to run an SQL statement but it is not working.

The statement runs from a button on the sub form subOriginForm. Its intention is to collect the values from cboField1 and txtfield2 located on that form and insert them into tblTargetDB - but the whole thing isn't working.

Code:
Private Sub cmdMyButton_Click()
'DoCmd.SetWarnings False
INSERT INTO tblTargetDB ( field1, field2)
VALUES (forms!subOriginForm.cboField1, forms!subOriginform.txtfield2);
DoCmd.SetWarnings True
End Sub

View 4 Replies View Related







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