Useful code AND the effects of using bad column names (4 Viewers)

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:03
Joined
Feb 19, 2002
Messages
43,293
This database has several useful code procedures that you can copy into your BE to fix up defaults you don't like:
1. Change the allow ZLS string property to No If you want to make a text field required, it makes no sense at all to have the Allow ZLS property set to Yes.
2. Turn off sub datasheets - improves efficiency.
3. Remove "DBO" (or other) column name prefix - If you link the BE tables directly from SQL Server et al, you end up with user prefixes. This code gets rid of them.
4. Change Long Int default to Null. Although it is rational to default currency and other numeric data types to 0, Long Integers are almost always used as foreign keys and the default for a foreign key should be null rather than the Access default of 0

The switchboard in the database supports more lines than the Access default. This explains how.

"What happens when I use bad column names?" You will be amazed. Now that you know what is really going on, you will realize that you probably need to fix the problem you didn't know you had. This form concentrates on the worst and most common offenders of "Date", "Name", and "Now" as well as embedded spaces/special characters.

The zip includes documentation for the "bad column names" form so you can understand what you are seeing. It will be unzipped to the folder where the db is unzipped to. So, clicking on the button should just open it. If you have a problem, you may need to modify the code or just open it manually.


Updated 4/26/24
 

Attachments

  • UsefulCode_20240426.zip
    153 KB · Views: 7
Last edited:

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:03
Joined
Feb 19, 2002
Messages
43,293
Updated 4/26/24
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:03
Joined
Feb 19, 2002
Messages
43,293
I added two new forms.
1. displays references for the database
2. displays all the Environ settings and their values for the database
 

Users who are viewing this thread

Top Bottom