Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Form: Too many fields need more room. 4

Status
Not open for further replies.

Focusfocs

Programmer
May 3, 2004
35
US
Hello all,
I have a form that is to have the names, addresses, phone numbers and email addresses plus a couple of other fields for 11 people. Now, you can imagine this takes up a great deal of space on the form with all it's textboxes and labels. I decided one way to cure this ailment would be to delete the labels and set the textbox default value to whatever the field is (ie "First Name" would be the default value for the field 'First Name' so that the person doing data entry would know what to put in that field being that there is no label). Ok, that would work, but then you need to delete the default value to input a new value. I was wondering if anyone had ANY suggestions for me in regards to either setting up an 'onclick' expression to either delete the default value within the textbox or a different approach alltoghether. Thank you very much.
 
Could you not normalise the underlying structure so that each record had the details of one person, then you can have an extra field in to group the names by (so you can easily retrieve all 11 related people together)?

This would reduce the quantity of fields needed in your form, and allow you to put the labels back on.

John
 
Hi
A few ideas.
Set the ControlTip Text to the name of the field.
Set the Status Bar Text to the name of the field.
Set Behaviour Entering field to Select Entire Field, so the user can just start typing the new data and thereby delete the default value.
Put some code into the OnEnter event, but this might be a nuisance, because you would only want to delete the field contents if it said, for example "Enter First Name"
Code:
If Me!FirstName="Enter First Name"
  Me!FirstName=""
End If
Put in a page break, or tabs to have fewer fields (may not be what you want)
 
If you cannot normalise the data for some reason, as JRBarnett suggests, why not add a Tab Control to your form? You could then, for example, set up 11 tabs, with the details of one person on each tab.

You can then view a person's details by clicking the tab. If each of the eleven people has a fixed 'title', such as Customer, Manager, Supplier etc, you can use these values to name the tabs.

I hope that this helps.

Bob Stubbs
 
Focusfocs

Listen to jrbarnett. You can end up with a lot of problems, especially if you have a large database, if choose not to take advantage of a relational database.

Here is some reference material....
Fundamentals of Relational Database Design by Paul Litwin
Download document
Read on-line (HTML)

Micro$oft's answer...
Where to find information about designing a database in Microsoft Access
283878 - Description of the database normalization basics
304467 - ACC2000 Defining Relationships Between Tables in a Microsoft Access Database

...Okay...

I have a form that is to have the names, addresses, phone numbers and email addresses plus a couple of other fields for 11 people

Do you mean you have one record that displays 11 contacts?

A more common approach for a Contact database would be to have a Company table and a Contact table...

tblCompany
CompanyCode - primary key
CompanyName

tblContact
ContactID - primary key
ContactLN - last name
ContactFN - first name
CompanyCode - foreign key to tblCompany

Here, you can assign a contact to a company by assigning the CompanyCode for contact. Why this way?

Well, suppose the Company A moves their office location, and they have 10 comployees. With a flat file system, you would have to change the address for the Company A ten times. With a relational database, you only need to change it once.

You also avoid inconsistancies such as Street Str. Str St. St because there is only one address.

...Instead of looking for work-around solutions for the 255 object limit on a form, look at "normalizing" your database.

Richard
 
I thank you all for your prompt and sensible solutions. I think I'm now well on my way to creating what the client needs. I am creating a database that houses group information. Each group consists of a leader and ten members. Each and every member has to have their info - address, phone, etc- tracked. Each group needs an identifier or primary key so that I may keep them all under one record. Also, being that I am to 'turn over the database' to other people that aren't technically inclined, it is impairative that I keep it as simple as possible so that they may query the data. All of your suggestions and tips really helped and I appreciate each and every one. It's good to have a place to turn to to bounce ideas off of other people.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top