Change Field name in Table with VBA
Thank you for taking the time to report an issue.
What's wrong... Please write below.
I can't seem to get it to work in either VBA or as an expression. In VBA I get a debugging error as to how I reference the table field value. In an expression (I am not sure how to refer to the back color of a field) I first tested with true returning "Good" and false returning "Bad".
Even though the table field value is blank, it returns "Bad". I even tried to include IsNull(""), but this still returns "Bad".
Even if I put a value in the table field and refer to that in the expression, it still returns "Bad" instead of "Good".
At the moment I don't have a date selection form before the report, but I have a record in the table that shows when switching the report to View mode.
In this article
* What happens when I change the field size?
* Change the field size of a number field
* Change the field size of a text field
This is fine for all the simple tasks, but what I have myself into is a little more complex than the Macro builder is ready tohandle I think.
Before, when I created a button, not a Macro. I am trying to build the following button types:
Button 1 - Update a Field in a table, Save form, Close form
Button 2 - Update a field in a table, save form, new record
Button 3 - Update a field in a table, save form, print report, close form . and so on and so forth.
I used to put 3 or 4 buttons on the form, then copy and paste the generated vba in the correct order in a single button, and delete the dummy buttons. But now it seems as the basicfunctions are built using an embedded macro, and when that is combined with VBA, Access must choose between one or the other, rendering my button useless.
Is there a setting in 2010 that will change the way buttons are created in that VBA is used by default instead of macros?
I can easily see a method if one can put vba in the front-end form that the user uses. I can use vba to insert a change code into that record's log field.
But I can not see any method that would exist only in the back-end file. Is there any technique out there?
The only way I can fix it atm is by using the Compress and repair database,which restores the links between VBA and the forms etc.
What causes this to happen? Is it a known bug in Access 2010?
The table is used by a bunch of other things, so I don't want to change the field name there, and the field name for the output is used by a bunch of things, so nor do I want to change the name there. I am using Access 2007. I thought about changing the output field to IGP_, and I could change the embedded queries in Excel that use it, but is there a way to still use the same name, and have a formula in it, and that uses a field in another table
If I wanted to search for an employee but their name does not exist (typo, etc.), yet I have their ID number. I can just enter their ID number and not have to change the search to now look in the ID field of the table. I can just type the Id number and the whole table will be searched for that number
Now, I would like to change fields that share the same name. Builder.bld to Builder.bbld.
Is there a way to change field names using SQL. Within the five tables. I probably have 20 feels or more were I would like to change the field name, just by adding the first letter of each table to the affected field.
So is there an SQL command where I can:
Change Builder.bld to Builder.bbld
Change Builder.addr to Builder.baddr
Change Builder.phone to Builder.bphone ?