Concatenate Form Control In A Table Name

Jul 21, 2005

Is it possible in Access SQL to concatenate a control into the select statements table or fields? Such as:

SELECT fldtotal & [Forms]![frmTest]![lstYears] & fiscal
FROM tblTotals & [Forms]![frmTest]![lstYears] & Archived

The statement would normally be:

SELECT fldtotal2003fiscal
FROM tblTotals2003Archived

Unfortunately, I am querying somebody elses tables. They archive the data yearly into a new table to control bloat. Instead of yearly having to create a new query for the new year, I was wanting to just have a form that had a list box of years. Then the user can just select what year they wish to query, and the query is automatically updating the field, table, where condition, etc.

I do not know if this is available in Access as it is in Oracle / Coldfusion. Thanks for any help though.

View Replies


ADVERTISEMENT

Concatenate Two Columns In Table Design

Apr 25, 2008

I have created a Table Design
Name
Last Name
ID Number
NameID

I import data from CSV xls file which has Columns of Name, Last Name, ID Number.

What I want to achieve is while importing it should Concatenate Name and ID number and store in Name ID.

I have searched it well but havent been able to find solution. Any suggestion how to achieve this.


Thanks
NIRI

View 4 Replies View Related

Modules & VBA :: Concatenate All Email Addresses From Table

Aug 4, 2013

I have a table, "TBL_Email", which simply contains a list of email addresses in a field called "email".

I would like to concatenate all of them together into one string, and add semi-colons to the end e.g.

"123@abc.com;456@def.com;789@hij.com"

I believe a may need a record set, but i'm not entirely sure how they work.

View 4 Replies View Related

Tables :: Survey File - Concatenate 2-3 Field Values In Table

Sep 6, 2014

I have a project that in Access. I'll be handling a survey file that will maintain answers per customer. The visit to customer is done monthly in a year, which means that a customer can have 12 visits in a year. My problem is that if I will maintain this project for the next five years or more, I have to maintain another field in my table that will block the duplicate entries.

View 5 Replies View Related

How To Concatenate A Row In Query And Put In Text Box In A Form

Jan 1, 2013

How do I concatenate a row in a query and put in a text box in a form? I have a Query returning up to 10 dates the row is called [Date] I need to put them all together with a space and a comma between them and place that in a text box on a form.

View 2 Replies View Related

Queries :: Concatenate Field Data Into One Cell In Query According To Linked Table ID?

Mar 8, 2014

i need to Concatenate a fields data into one cell in a query according to linked table ID....

View 3 Replies View Related

Write A Concatenate Query And Display Result In A Text Box On A Form

Jul 20, 2005

Here's the form I'm trying to Create:

VEH POS NAME
A21: TC: CPT Somebody
G: SGT Someoneelse
D: PVT Noone

A22: TC: SFC Smith
G: SGT Jones
D: PVT Doe

and so on and so forth.

The VEH and POS are just going to be Labels in a form....no prob. Each Soldier's Squad and Team (for mounted Vehicle and Position) are stored in the Personnel Table. The below query is for vehicle A7 (ACTUAL would be the same as TC above). The query works. I just need to know how to get the result to display in a text box. What I'm planning on doing is creating text boxes for each posistion with these small select queries, so when I update the SQD and Team in the Personnel Table it updates on this form. Or is there an easier way to do this?

Dim strSQL as string
strSQL="SELECT [tblPERSONNEL]![RANK] & " " & [tblPERSONNEL]![LAST_NAME] AS NAME
FROM tblPERSONNEL
WHERE (((tblPERSONNEL.SQD)="A7") AND ((tblPERSONNEL.TEAM)="ACTUAL"))"

View 3 Replies View Related

Queries :: Concatenate Related Records Into One Expression / Field In A Form

Feb 13, 2014

In my query, I have several results that relate to the same PK overall, and I'd like to concatenate these records into one expression/one field in a form.

Currently my query looks like this;

As you can see, the BandPK/BandFK are repeated where the GenreFK/GenrePK are different. What I'd like to do is concatenate the column named Genres into one field so the BandFK/PK isn't repeated.

View 14 Replies View Related

Find Table And Field For A Form Control

Jan 7, 2008

Given the firmname and textbox name is it possible to programmically get the fieldname and table name where the data for that control is held.

I can use .controlsource and .recordsource

But is possible that .controlsouce is an alias of the actual fieldname.

Similarly the recordsource could be a query, from that I want to get the actual table, complicated say if two tables in the query had a field with the same name (even if only one was referenced)

Thanks.

View 3 Replies View Related

Writing Control Names On A Form To A Table?

Sep 21, 2011

I need to create a table with names of controls on my forms.

I'll use that table to apply user rules.

Any solution to write the table automatically using VBA code ?

I know how to populate a combobox...

DoCmd.OpenForm YourFormName, acNormal, , , , acHidden
Dim c As Control
For Each c In YourFormName.Controls
[Control-Name].RowSource = [Control-Name].RowSource & c.Name & ";"
Next c

..., but not how to write a table.

View 1 Replies View Related

How To Count And Sum Registries From A Table And Pass It To A Control In Form

Jan 11, 2015

In Access 2013 I have a table to registry the presents in a condominium meeting.

Table Name: tbEntities

Fields:

tbEntId...tbPresent (yes / no)..........tbVotes
1.........yes...........................5
2.........no.............................3
3.........yes............................4
4.........no.............................6

I want to put in a form (like a navigation/menu form, with no souce data):

1. a control that count how many are present (= yes)Ex: Appearances 22. a control that sum the votes of those presentEx: 9 Votes

View 6 Replies View Related

Forms :: Linked Table - How To Assign Image To A Control In A Form

Dec 7, 2014

I have a linked table in ms access and it has a column as details. in ms access when i click on this button i will go to another form. i want to assign a picture (for opening a form) to this column but i don't know how i have to do this. my form opens as a datasheet view.

View 3 Replies View Related

Forms :: Rota Table - Continuous Type Form In Tab Control

Oct 23, 2013

I am mid way through a Access db and have a solid idea what i want from a form. The idea is for a rota display and edit form.

a tab control with 5 tabs (-2 weeks, -1 week, current week, + 1 week, + 2 weeks) and when the user clicks it lists all the employees (Employee Table) with any found rota entrys (Rota Table) populating into a text box type table with employees information blank where no rota information has been entered.

then the user can edit / add shift information from that table and hit save.

the main rota information is inputted by an excel import but this is done once a month and adhoc changes will be needed (holidays absence etc)

the only thing i found like what i want is a continuous form (which ive never used before but been told that wont go in a tab control)

How i would accomplish this (code snippets - doesnt have to be detailed just the fundamental functions so i can add modify to suit the information the sql's i already have its just the form controls.)

View 3 Replies View Related

Forms :: Pass Count And Sum Value From One Table To Not Linked Control In A Form

Jan 12, 2015

In Access 2013 I have 2 tables

tbAssembleias
tbEntities

The tbEntities, have a fiel called tbPresent (yes/no) to register the presents in a condominium meeting.

Table Name: tbEntities

Fields:

tbEntId...tbPresent (yes / no)..........tbVotes 1.........ye...........................5
2.........no...........................3
3.........yes..........................4
4.........no...........................6

In the form is the table tbAssembleias, but I want to put from the other table which is not present in the form:

1. a control that count how many are present (= yes)Ex: Appearances 22. a control that sum the votes of those presentEx: Votes 9I already have a query that count how many are in the meeting, but cant realize how to pass the information to the field in the form..This is the SQL view of the query with the real field names - and working:
SELECT Count(tbEntidades.tbAssPresente) AS ContaPresentes, tbEntidades.tbAssPresente
FROM tbEntidades
GROUP BY tbEntidades.tbAssPresente
HAVING (((Count(tbEntidades.tbAssPresente))=True) AND ((tbEntidades.tbAssPresente)=True));

View 1 Replies View Related

Forms :: Populate Control In A Form Based Off Of Two Different Fields In One Table

Jun 24, 2013

I am wanting to populate a control in a form based off of two different fields in one table. Is that possible?I have a table called tblEmployeeMaster and it has a LastName column and a FirstName column in which I need to have both first and last name show up in one box on my form?

View 6 Replies View Related

Replacing Running Total From Subforms Control To Main Form Table Field

Jun 11, 2015

I have an access form (Customer) along with a sub-form (Work_done). On sub-form I have Running sum of Amount in Text box-1. I want that Total of Running sum be replaced with Main form's tables field total_amount. Is it possible that we can replace an amount of control of sub-form into main form's field?

View 1 Replies View Related

New Field Does Not Show In Control Source For Form Control

May 28, 2015

I have table that I had to add a new field to which we update with a form. I tried to add a control for the new field but the field does not show up in the list for the control source. I am trying to add a list box to the form with a blank and 5 options.

I have attached screen shots of the table design and the form. The table has the field in datasheet view and I have manually entered a few entries in it but it still will not show in the control source for the form control. The top section of the form is where we enter and select the data for the new records. The bottom section (circled in red) autofills the matching record, from separate tables, for updating with the new entries.

I have added form controls for modified fields in the past so I am confused about why this is happening.

View 2 Replies View Related

Forms :: One Table / Three Forms - Each Form With Control Tabs

Jul 4, 2013

I'm trying to make a very simple click through data entry screen in Access 2007. For each record I want to have a standard form with three buttons at the bottom. Each button opens a new form (each form has a set of tabbed pages on it as there is lots to enter).How do I make sure that each of the additional forms populate the same record as the main form.

View 1 Replies View Related

Concatenate And Iif

Mar 24, 2006

I have a problem I am working and and am not sure what the best approach is, hoping someone can lend me some insight:I have two fields on a table:SerialNumber....LocationI need to concatenate these two (no problem there). However my situation is such that my serial numbers vary in the number of digits. For example:serial - 55124 (five digits)serial - 552356 (six digits)serial - 5514235625 (ten digits)the serial number field is 10 characters and the serial numbers can be anywhere from one to ten in length (this is external data I am working with, not data I created)When I concatenate the two fields I need the location value to always be in the same place, so if I have a location called - TEST - I need the end result of my concatenate query to place the location always after the tenth place of the serial number position, like this:55124_____TEST552356____TEST5514235625TEST(Without the underscores)Don't ask me why...it's a long story.

View 2 Replies View Related

Concatenate

Dec 9, 2004

I have a table that I would like to concatenate three name fields:

Last Name, First Name, Middle Name. I inserted a field between each one to create a space when the fields are brought together. The table looks like this:

Last Name, Blank 1, First Name, Blank 2, Middle Name

When these five fields are brought together they can not exceed 25 characters, so the middle name will cut off when the field reaches 25.

Any help will be appreciated.

View 1 Replies View Related

Concatenate Question

Aug 27, 2006

Hoping someone can help me with this:

I have a table with two fields that I am wanting to concatenate. The two fields are: Order and Line#. The line numbers are sequential by tens, like this:
10, 20, 30...etc.

So I have order lines that are from two to four digits. Like this:
20
120
1020

All order numbers are six digits. I want to concatenate the order and line (easy to do) my problem is I want to append zeros in front of any line number less than four digits. For example, using the lines above and an order number of 111111 I want the result of the concatenation to be like this:
1111110020
1111110120
1111111020

Sorry to ask...but I don't know how to do it.

Thanks for looking!

View 3 Replies View Related

I Am Trying To 'concatenate' The Two Id Fields Together

Oct 17, 2006

I have two fields in a table.

client_id and property_id

client_id is an autonumber with a format of 0000000 (meaning the first record is 0000001)

property_id is made up from the first 4 letters of and address line (for example Smith Street would be shown as 'Smit')

I am trying to 'concatenate' the two id fields together, via an expression in a query, to get 'Smit / 0000001' but can only seem to get 'Smit / 1'

How can I solve this ?

View 4 Replies View Related

Concatenate Names

Apr 6, 2007

My database has FirstName and LastName fields.
I would like to initialize a new field called UserID with the first letter of the first name concatenated to the last name. I have found references that point to using Left([FirstName],1)&[LastName] but am unsure if this can be done in the table definition or if it must be done using a query. Either way I could use some advise on initializing this fields since I have 3500 registered users.
Thanks

View 2 Replies View Related

Concatenate And LOOKUP Help…

Aug 24, 2007

Here’s my goal.
1.)I have one column and want to add a 633 in front of if.
a.Expr3: "633 " & [Grp] & ""
b.This only shows 633 and asks for an entry for the GRP? Why? I want the format to be 633 xxx. If I do add, lets say, 123 in the popup, all of the columns are 633 123.
2.)After combining the following, I want to take that number, and look it up in another query. If the number matches a number in the other query, than I want it to enter the number in column 1. If not, I want it write no number. I have gotten this part to work using an IIF function but I just wanted to let you know what I am after.

View 6 Replies View Related

Concatenate Four Fields

Feb 25, 2008

I have this query
SELECT [9A].DO, [9A].WORK, [BATCH] & " " & [SOURCE] & " " & [NO] & " " & [SEQ] AS RECEIPT,
FROM 9A;

It returnes the results like this:
RECEIPT
6/2/2003 P 29 10
1/15/2003 P 54 55
3/3/2003 P 42 7
1/6/2003 P 39 35
12/30/2002 P 23 30

What changes are needed to the query to return it like this:
06022003P0029010
01152003P0054055
03032003P0042007
01062003P0039035
12302002P0023030

In other words
The date must have 8 charactors with no /
Then P with no spaces before or after
The next number must have 4 charactors no spaces
and the last number must have 3 charactors

Thanks

View 1 Replies View Related

Concatenate In Acess

Apr 4, 2006

Hi ...

I have a table called new items which has these fields

Name (Primary)
Serial No
Tag Type
Description
Status


I want the name to be unique and generates automatically and be SerialNo + Tag Type + Description <<<< NAME

I tried a querie which doesnt work
Code:[Description] & ", " & [SerialNo] & " " & [AssetType]

View 1 Replies View Related







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