View Single Post
  #3  
Old November 11th, 2009, 09:40 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Question about form operations

On Wed, 11 Nov 2009 09:05:02 -0800, stacie.2410
wrote:

I've got some experience with Access, but it's not extensive, and I really
can't figure out how to make something work the way I need to, or if it's
even possible, so I thought I'd ask here.

I've set up a form to use to enter data about a department, there's about 8
fields of data that will be filled out that pertain to the department. (Each
department will have it's own form.)


Well... that's probably NOT a good idea. You would only have a different form
if you were collecting different KINDS of information (different numbers and
kinds of fields) about each department.

Now, on that same form, under the other
rows of data, I'd like to set a button to push that will let me add a row of
data (to kinda create a little table), that will let me enter the employees
that are in that department, one row per employee, and the row will have
other data on it too, such as employee number, hire date, office number, etc.
There isn't a set number of employees, so I could just enter one employee,
or I could push the button and insert multiple rows for however many
employees I need.

The data doesn't HAVE to be entered directly into the little table, as long
as it does show up there. For instance, if you push the button and a small
subform pops up where I enter the data and then save and exit it, and it
takes me back to the main form where the data was entered into the table for
me, that'll work too.

Is this possible? Do you have any suggestions?


Stop. Step back. Check out some of these resources, particularly the
tutorials:

Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/acc...resources.html

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

Roger Carlson's tutorials, samples and tips:
http://www.rogersaccesslibrary.com/

A free tutorial written by Crystal:
http://allenbrowne.com/casu-22.html

A video how-to series by Crystal:
http://www.YouTube.com/user/LearnAccessByCrystal

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials

It sounds like you're making the very common mistake of starting your database
design with Forms. Forms are *very much secondary* - the Tables are the basis
of your application, not the forms. I'm guessing (in the dark, not knowing
anything other than what you posted) that you need two tables: a table of
Departments with a unique DepartmentID, name of the department, various other
information about the department as a whole; related one to many to a table of
Employees, with an EmployeeID, DepartmentID (which department is this employee
working for), LastName, FirstName, and other biographical data.

A Form based on Departments with a subform based on Employees would let you do
what you need... without any need for "a different form for each department".
--

John W. Vinson [MVP]