Append new form data to various tables

  • Thread starter Thread starter sotto_izi
  • Start date Start date
S

sotto_izi

hi..

i just got a problem in making a database system. I'm not that familiar with
sql statements etc. i have a form asking a client some information, it
consists of different field values found in different tables. i want to
append those values to their exact table where such fields exist. i had a
difficulty in appending those values because some of my tables have fields
that are not asked in my form, so it would tend to ask for a value.. how
would i resolve this problem?

these are some of my values:

Table: enrollment
enroll_num (autonum) primary key
CourseID
Discount
EnrolledBy
amount
StudentIDNo

Table: student
StudentIDNo
FamilyName
FirstName
 
1) If the values aren't in your form, where can they be found?

2) Quite likely the relevant part of data structure can be displayed
using an Access form with one or more subforms, each bound to the
appropriate table. With the two tables you mention, you'd bind the form
to the Students table and the subform to the Enrollments table. Probably
the Enrollments subform would be in Continuous View, with a combobox
bound to the CourseID field. The combobox's RowSource would be a query
on your Courses table.

In the Northwind sample database, the Orders form works this way. The
form is bound to the Orders table, the subform is bound to the Order
Details table, and the combo box is bound to the ProductID field in
Order Details but its RowSource is a query on the Products table.

Doing it this way is general *much* simpler than using an unbound form
and writing VBA code to append the data to various tables.
 
thank you for your advice.

but, actually, what i'm trying to say is that my form is supposed to be a
user-input.

i want the values assigned in the different fields be inserted into my
desired tables.

how can that be possible? i really need your help.

thanks in advance.
 
You can either use a bound form as I described, or an unbound form. In
the latter case you will need to write VBA code to collect the data from
the controls on the form and append it to your tables.

I strongly recommend that you consider using a bound form (with or
without subforms). If you are not already familiar with designing and
using bound forms for entering and editing data, you will find it
extremely difficult to create an unbound form that works satisfactorily.
 
Back
Top