Creating New Fields

dromorkid

Registered User.
Local time
Yesterday, 23:45
Joined
Aug 5, 2008
Messages
13
I have a table (tblCompanyInfo) with the following Fields:

CompanyID
CompanyName

I want to create a form where I can add Company Names to the table. Easy, yes I know. On the form I want to be able to display 1 text box for input of the Company Name but with the option of adding more than one Company Name if required. The amount of Company Names to be added is not limited. Ideally I would like to have the 1 text box and a button that when clicked will dispaly another text box underneath this, creating a new record in tblCompanyInfo when data is input.

I should add I guess, that the tblCompanyInfo is linked to another table via CompanyID in the other table and the KeyField CompanyID in tblCompanyInfo.

Any suggestions? Is it a show/hide feature? I didn't think so as I need to generate a new record in tblCompanyInfo and also, as the list is not limited, then the amount of text boxes I would show hide would have to be unlimited.
 
Another table is the way to go using the CompanyID as the link.

The way to present the information is through subforms. Although the information is for older versions, for what you need it still applies. Check out the following link and it should get you a little more familiar with subforms.

http://www.fgcu.edu/SUPPORT/OFFICE2000/ACCESS/

-dK
 
So create another table so that I have 2 tables that will look like this:

tblCompanyInfo : CompanyID, CompanyNameID
tblCompanyNames: CompanyNameID, CompanyName

And the display method you suggest would certainly work, but I was curious was there a 'fancier' way of doing this, like the idea I had above with a button? If not, its fine, you have guided me to getting it to work, I'm just a freak for making things look different than the norm!
 
tblCompanyInfo : CompanyID, CompanyNameID
tblCompanyNames: CompanyNameID, CompanyName

quote]


Exactly. I am not sure what you mean by fancier. Maybe my creative side isn't up to par, probably just a question of form following function.

The frmCompanyInfo (bound to tblCompanyInfo) will present that information and you can have frmCompanyNames subform (bound to tblCompanyNames) presented in datasheet view to just present AKA names. If it is just one or two columns of data you can edit the subform to present those vertically down the side.

If you wanted a button to open up another form with all the company names you can certainly do that, but then forcing your user to excercise more time to look at company names. I don't know the frequency of use, I try to minimize the clicking actions of users because in a year that could add up (I can't stand websites that make me click 30 times for one piece of information.)

Again, up to you. However, start small and dream big. I would recommend get this piece working so your db will work and play with fancy modifications for version 2.

-dK
 
Thanks for your help, totally appreciated. I have to stop thinking outside the box and get the function working primarily like you suggest.
 

Users who are viewing this thread

Back
Top Bottom