Changing The Field Name - Dynamically

Feb 18, 2006

Hi All,

I have built queries based on tables. The field names are the technical field names of an application. For example pernr is actually Personnel Number etc.

My queries are set up as follows:

Field = pernr
Table = etc

I would like to rename pernr to Personnel Number so that the column heading in the datasheet view is Personnel Number.

I know I can do this manually for each query by using the following as the field: Personnel Number: pernr

Is there any way of getting this be done dynamically using a lookup table etc. I have lots of queries and I don't want to manually change them all. Furthermore, if I wanted to rename Personnel Number to Personnel No. then I could do it in the mapping table rather than in all the queries.

Thanks,

Evan

View Replies


ADVERTISEMENT

Forms :: Dynamically Changing Captions

May 20, 2015

I have a system that has a growing number of forms. On each form they are a variable number of labels/text boxes/command buttons etc. The captions for all of these are in english.

The database is to be deployed to a non english speaking country so I want to be able to dynamically change all the captions on the forms (not n the data) to the local language.I know how to do this. For each control on load I decide the local language and change the caption accordingly ie (and code is for illustration only and not necessarily syntactically correct)

if locallanguage = 1
me.control1.caption = "save in english"
me.control2.caption = "heading1 in english"
else
me.control1.caption = "save in local language"
me.control2.caption = "heading1 in local language"
end if

What I want to know is there and easy way to do this. Rather than wade through each control on each form and find out what the name is can I generate anything that will give me all the control names and captions for each form (and report)?

View 14 Replies View Related

Reports And Changing Labels On Form Dynamically

Nov 24, 2004

I have created a report to display a bill of materials (boms). The report works as I have designed. I have also figured out how to filter the report using the docmd.openreport vbasic call with filters. This works fine. I use a form to select the filtering I need in the form of 2 Listboxes populated from tables. The form opens, the report generates and displays in preview mode. What I cannot do is the change the title text (Text Label on the report Header). I would like to use the selected items in the listboxes as sources of text for these controls on the report so I can use the report over and over for different boms. ANy help would be greatly appreciated! Vbasic I hope!

View 1 Replies View Related

Dynamically Add Field To Record

Feb 24, 2005

This may be a really straightforward one but I cannot seem to find a solution.

I need to run a select query, (for a mailout) then mark the records that have been selected in the query on the main database table with a mailshot code.

Any ideas on how best to achieve this?

I was thinking of making the select query maketable (because I have to export a txt file of email addresses for a mailing list), then add a mailshot code field, then append this extra field to the main table.

The trouble is that I am not sure how to use the query to add this extra field to the maketable & once this has been done, how do I append the values to the original table when the mailshot code field does not exist, can it be dynamically created?

Any help will be much appreciated.

View 11 Replies View Related

How To Construct Dynamically A Table Field Based On Query Criteria.

Sep 13, 2007

Hello all,

I have a temporary table with Yes/No fields (F101,F102,F103,....etc).
In another table i have a field called ProductCode with values (101,102,103,....etc)
Is it possible to append(or update) the records of the temp table with criteria on "F" &ProductCode field? (For example if ProductCode=101 then F101 sets to yes)

Thank you in advance.

View 4 Replies View Related

Queries :: Changing A Text Field Into A Number Field Using A Query

Jul 31, 2014

I currently import data into a table and it it has a text field which looks like this: 12,345.67 GBP...I need to use a query to make this a number field so that I can sum it's contents. I've managed to remove the 'GBP' part but can't seem to get rid of the comma?

View 4 Replies View Related

Dynamically Update Field Of A Current Record Based On Previous Record

Apr 30, 2007

I need a way to dynamically store a particular value in "field_2" of the CURRENT record depending on whether or not the value of "field_1" of the CURRENT record is identical to the value of "field_1" of the PREVIOUS record within the same table. The table is sorted on "field_1".

So, if the value of "field_1" in the CURRENT record is "ABC" and the value of "field_1" in the PREVIOUS record is also "ABC", then store a value of "PPP" in "field_2" of the current record. IF on the other hand, the value of "field_1" in the CURRENT record is "ABC" and the value of "field_1" in the PREVIOUS record is "XYZ", then store a value of "WWW" in "field_2" of the current record.

I have a report that will use these results to count only the number of records that have a "WWW" in "field_2".

Is this doable, maybe in a query somehow?

I should add that whatever the solution, it needs to be compatible with Access 2000.

View 1 Replies View Related

Changing Name Of A Field

Jan 4, 2007

I have a table Client-Details,in which i have a record namely "bharti-chennai".this table is associated with aother table "release-details". bharti-chennai has records in relase details.i want to change the name of bharti-chennai to bharti -mumbai ..how to do it.

View 3 Replies View Related

Changing A Field Automatically

Dec 7, 2004

hiya... he's my problem........

i have 3 tables: tblVolunteer, tblMedicalCondition, tblVolunteerMedicalCondition.

in tblVolunteer i have: volunteerID, volunteerName, HEALTHY (yes/no)

If a volunteer doesn't have a record in tblvolunteerMedicalCondition, i would like the HEALTHY field in tblVolunteer to default to 'yes', and if they do get a related record in tblVolunteerMedicalCondition, i would like the HEALTHY field in tblVolunteer to change to 'No' automatically.

How do i achieve this please..????

many thanks for viewing!!

View 1 Replies View Related

Changing A Field Automatically

Dec 7, 2004

hiya... he's my problem........

i have 3 tables: tblVolunteer, tblMedicalCondition, tblVolunteerMedicalCondition.

in tblVolunteer i have: volunteerID, volunteerName, HEALTHY (yes/no)

If a volunteer doesn't have a record in tblvolunteerMedicalCondition, i would like the HEALTHY field in tblVolunteer to default to 'yes', and if they do get a related record in tblVolunteerMedicalCondition, i would like the HEALTHY field in tblVolunteer to change to 'No' automatically.

How do i achieve this please..????

many thanks for viewing!!

View 1 Replies View Related

Number Field Changing

Jan 17, 2005

This might be simple but I just can't figure it out.

I have a table that has a number field. Everytime I enter the number 1.50, it changes to 2. I would like to keep the 1.50. Somehow, I can't get this right. Is there a setting that I have to change? Would I need to make setting changes on the form portion also?

thanx for any help

View 4 Replies View Related

Changing To Field Value Instead Of Fields.

Dec 14, 2006

Help needed: Large Yes/no tables!

I have a form with names of employees, and different skills that employee has.

It is listed in a form as columns with the employee name in rows, and columns for the skills. The form is in fact really great, but I see that the solution might bring problems in the future because of maintainance issues, and field limitations. I add fields frequently, and the table is growing without me beeing able to control it.

I have organized this in only one table, and used the name of the skill as a field. There is many other tables in the DB, but none of them covers this area.

exampletable:

employeeID | auto
employeename | text
Hireddate | date/time
Fireddate | date/time
baking | yes/no
cooking | yes/no
driving | yes/no
juggling | yes/no

With this solution I get the skillname as a heading, and the name as a column with lots of yes/no values. I love the filter functions, and the form is quite nice...


exampleform:

Employee baking cooking driving juggling
employeeeID1 yes no no yes
employeeeID2 no yes yes yes
employeeeID3 no no yes yes
employeeeID4 yes yes yes no

and so on.

Is there a way to organize this so that the skill name comes in the top row, the results get listed as shown above when the skill is placed as a field value, not a field itself?

I have looked for a solution with many-to-many relations with 3 tables, but cant seem to make it work right. It is especially the form I have trouble creating with the new design.
I have also tried to make crosstab queries with minor success.

Does anyone have a suggestion on how I can make the relations work.
One employee can possess a great number of different skills, and the skill can be possessed by a great number of employees. This is not a difficult issue by itself, the problem is to make the form as shown over.



Thank you, in advance.

View 1 Replies View Related

Changing The Field List

Apr 5, 2006

Hello,
I have a form that I need to modify. Currently, the field list shows Query 1 as the 'control source' for the text boxes on the form and I need to change to use Query 2 but I am unsure of how to do this. Do I have to delete the test boxes and start fresh or can I change the field list and use Query 2 as the source?
Thanks for any help.
JTP

View 2 Replies View Related

Changing Value Of Another Form Field

Jun 30, 2006

I have a property form for keeping track of houses and buildings owned and then on that form i have a policy field for the policy number of the insurance called txtPolicy. Next to that field I have a little button which opens a form so it will show all the insurance policies associated with the housing group which the property is in. When i select the appropriate policy and double click it in the listbox I want it to close the form and set the value of the txtPolicy to the one just selected in the listbox. I know how to get the value of the item selected in the listbox but I just don't know how to set the value of a field on another form...

View 1 Replies View Related

Changing Field Names

Dec 14, 2005

I am using ASP to try to edit the column (field) names of my Access database. Here is an example of would I would like to work:

Code:data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ Server.MapPath("databases/logins.mdb")Set rs = Server.CreateObject("ADODB.Recordset")rs.CursorType = 2rs.LockType = 3 rs.Open "SELECT * FROM Users;" , data_sourcers(1).name="blah"

The last line is the problem. A field name in an ADO recordset is limited to read-only persmissions for opened (already exisiting) recordsets.
link:http://www.w3schools.com/ado/prop_name.asp

Is there another way around this without using an SQL "ALTER" statement. In other words, by accessing the field's name through a number like rs(i).name instead of rs("fieldname").name?

Thanks.

View 1 Replies View Related

Changing Field Names Automatically

Oct 15, 2005

I have an Application that I want to re-use for a second user. The only change I need to make is to re-name the fields.

Is there a tool that can do this across the tables, queries and reports for each field name change ???

View 1 Replies View Related

Changing Field Format Defaults

Jul 5, 2005

Does anyone know how to change a field FORMAT default? I am creating lots of tables with lots of number format fields. I don't, however, want a zero default value (or any default value for that matter) for all of these fields. I can go in and delete them manually, but that seems like a backward way of doing things. Does anyone know how to elimate that default value from the format of a number field in general?

Thanks!
Carly

View 2 Replies View Related

Update Is Changing Field Type

Oct 1, 2007

i have a temporary table which is created by importing an excel file

some extra fields are then added to the table using sql vb code for example

strSQL = "ALTER TABLE [TBL_TmpSubmission] ADD COLUMN [EnergyUnit] TEXT;"
CurrentProject.Connection.Execute strSQL

these fields are later populated conditionally using an update exectuted again from vb code

If Me.cboProgram.Column(0) < 3 Then
strSQL = "UPDATE TBL_TmpSubmission SET EnergyUnit = 'GWh'"
Else
strSQL = "UPDATE TBL_TmpSubmission SET EnergyUnit = 'CarbonTonne'"
End If
CurrentProject.Connection.Execute strSQL

the problem is that this field now has a memo data type, this is a problem because i need to write a query which uses this field in a table join and access won't let you join on the memo type

anyone know why this might happen? for the time being i'm going to try and fudge this by using a further ddl statement to change the data type back to text but i'd rather know whats going on here

View 8 Replies View Related

Changing Colors In A Field Automatically

Mar 15, 2005

Hi everyone,

The problem I'm having is I need to have the background of a field change color depending on what's contained within the field. There's only three possible entries in the field: active, inactive, and a blank entry. I need it to show green if the field contains "active", red if the field is "inactive" or is blank (I also want the blank fields to show inactive, but that's niether here or there right now.)

I've been trying to get it to work with an if then statement, and setoption to change the background. I've had no luck with any of it, though.

Any help would be greatly appreciated. Thanks in advance.

-Walter

View 3 Replies View Related

Changing Language In A Date Field

Jul 27, 2005

I am working on a french version of Access but in my english forms, I need the current date field to be written in english - is there a way/expression to change the language of the date field on a form (from french to english)?

View 1 Replies View Related

Newbie: Changing The Value Of A Field On Form

Dec 11, 2005

Hello...

I am a newbie to Access or any database for that matter. So please be gentle.
I'm in the process of writing an automotive invoicing database and have gotten stuck early in the game.
On my form I have Qty1 - Mat1 - and Amt1 fields placed from my database.
In Amt1 I would like to typein an amount and have it multiplied by 15% (.015).
I fiddled with the "On Enter" in the Amt1 property box but got nowhere.
Can someone help???

Thanks for your time
d9085@hotmail.com

View 7 Replies View Related

Changing Data In A Field Using A Form

Dec 14, 2005

I have made attempts at this but none have worked, so I am looking for guidence.

What I creating is a database that I can track students and their community service hours.

I have made several versions but I figured the experts could point me in the right direction.

So far I created two tables:

tblStudents
STUDENT_NAME - Text
HOURS_GIVEN - Long Integer

tblHours
STUDENT_NAME - text Links to tblStudent
DATE_COMPLETED - Date
HOURS_COMPLETED - Long Integer

I created a form "frmStudent" with the following:

a drop box to chose a student name from "tblStudent"
a text box "txtSTUDENT_NAME"
another text box "txtHOURS_GIVEN"
another text box "HOURS_REMAINING"

Then I have a subform that has two text boxes "txtDATE_COMPLETED and "txtHOURS_COMPLETED"

I need a code that will enable me to chose a student from the combo box and then have that students name and hours given automatically enter into the respective text boxes in the main form. Then I would enter the date and hours completed into the respective text boxes of the subform, which in turn would update the fields in "tblHours" at the same time subtracting the new hours from the hours given and displaying the new total hours remaining in the respective in "txtHOURS_REMAINING" of the main form. Can anyone give me any help in coding that? Thanks in advance.

View 2 Replies View Related

Changing Field Background Colour

Mar 31, 2006

I'm opening a form in snapshot view and would like the background colour of all the fields in the form to be a dark colour to show that it is in snapshot. the user then clicks Amend and the background colour would change to something lighter to show they can amend the record. Is there any way of on the OnClick event of the Amend button change all the fields (and there's lots) at once without having to name them all individually, ie:

Me.text1.background = whatever
me.text2.background = whatever

Thanks

View 2 Replies View Related

Next Record After Changing A Sorted Field

Jun 9, 2006

Hi guys, I need a little help on next record stuff...:eek:

Can someone please explain how I can make my database actually go to the "Next" record after I update the "LName" field on my form? My database is sorted on "LName". After I update the "LName" field and save the record, the sort order is messed up. If I requery the form in the sub routine, the database goes to the first record. I need it to go to the "Next" record (the one that would have actually come next before I changed the LName). For example, if my database contains these names:

Baker
Doe
Franklin
Goodwin
Johnson
Jones
Smith
Taylor

and I change the current record's LName from Franklin to Phranklin, I expect the database to go to Goodwin (the record that would have followed Franklin) after pressing my next record command button. Likewise, if I changed Phranklin to Franklin, I expect the database to go to Smith (the record that would have followed Phranklin) after pressing my next record command button.

I've tried different versions of FINDFIRST on this site, but can't get it to work. I would like to find the next record based on my key field (autonumber) named "rec_id".

Thanks, and luv ya in advance!

-carol
http://profiles.yahoo.com/c_coop2005;)

View 14 Replies View Related

Quick Question Regarding Changing The Value Of A Field

Dec 15, 2006

I just wanted to know the VB code for changing the value of a field in one table from another.

What I need to specifically do is implement code in an AfterUpdate to change the value of a field in another table if a certain threshold is exceeded (in this case, entering a dollar amount greater than what I have specified). Effectively, I need this to 'flag' a contract by changing the field in another table to read "VOID".

Thanks in advance for all suggestions!

View 2 Replies View Related

Changing A Field Value For All Records In A Query

Mar 9, 2006

I have a query that pulls records from a main table based on a check box and I need a macro or code that will set the field value as if it were unchecked.

BTW I am self-taught and new at this so don't make fun of me if the question seems stupid.

Thanks!

View 8 Replies View Related







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