Unbound fields

R

Rhianne

I am new to access and am teaching myself how to create one. I grasp the idea
of fields and control sources, but I have fields that need to contain data
that do not have appropriate control sources - I think it was my own fault
for not inputting enough when I first created the form. So now I have at six
fields that are unbound, I have tried linking them to control sources that
are already linked to another field, but of course that doesnt' work.
Ideally, I would like to add in extra field names (to be renamed by myself),
that will not have to be controlled by sources that are controlling another
field. Otherwise it is the text or number is duplicated in both fields.
How can I rectify this problem? I do not understand much of the terminology
used in access, so in laymen's terms please!!
 
R

RBear3

Can you give us an example?

If you are adding a new field to your table and want to add it to your form,
that can be done.

Not sure why your new controls need to be unbound. What will you do with
the entry made in the control if it is unbound? You realize than unbound
data is lost when you close the form?
 
J

Jerry Whittle

What do you want in these 6 unbound text boxes? Where are you getting the
data to fill them? Do you want to store that information anywhere.

Unbound controls have various uses. For example you might want when the
report was run to print out. In that case the control source would be =Date()
or =Now().

You can also use unbound controls to do math. For example you could take the
number of products from the Products control and multiply it by the dollar
amount in the Cost control to get a total price.

There are some who like to make the entire form unbound. Data is entered
then verified/checked before being inserted into tables via code. If you are
just learning, this method is probably not for you.
 
R

Rhianne

I realise that now.

I basically want to be able to input data into these fields which can then
be saved.

So do I simply add a new field to my table? don't need to concern myself
with the form so much?

I truly am a novice when it comes to access! I have been able to rename some
fields and still keep them linked to their orignal control source, this is
what I want to do. Have a valid control source, but choose what I name the
fields.

does this make sense?
 
R

Rhianne

I want to be able to input data into them, to save and look at at a later time.

I shan't be needing to complete any maths, I simply want to know how to give
my own renamed fields a valid control source.

I am a totally novice when it comes to access.
 
R

RBear3

Also, while the field name does not HAVE to match the control name, it sure
makes it simpler to trouble-shoot. You can change the label that identifies
the control to the user, but I would generally not change the control name.
The user will probably never see your control name or your field names, so
make them useful and descriptive to you as a developer, not user-friendly.
 
J

John W. Vinson

So do I simply add a new field to my table? don't need to concern myself
with the form so much?

Many folks fall into the trap you're in.

The thing to realize is that the Form, although very important, is decidedly
SECONDARY.

The data in your database isn't in your form. It's in the Table, and only in
the Table. A properly normalized set of tables is like the foundation of a
house; if it's incomplete, or incorrectly designed, your whole house can come
tumbling down!

The Form is *just a window* - a tool to let you view and edit data in the
tables. Adding a textbox to a form does NOT let you store data permanently;
again - it's just a window, and if there's no room behind the window, you
can't do anything with it.

Since you're just getting started, it would be really important to make sure
your table structures are right FIRST, and then adapt the form to the tables
(rather than vice versa). Check out the references below (especially the
Database Design 101 links on Jeff's site, and Crystal's tutorial), and don't
hesitate to post back here with a description of your database: what's its
purpose, what information does it manage, and the structures of your tables.

John W. Vinson [MVP]
 
R

Rhianne

My database is for Personnel Records, it contains information that records
all staff's personal details and also training info, hours worked etc.

I would like to point out that I am now more confused than when I began!

I have looked at my table and it seems that quite a few of my fields on my
form are missing from the table - so do I need to add them into it? And will
they be paired up to what is showing on my form?

Thanks for the help! Much much apreciated!
 
R

Rhianne

I have now successfully made all my field bound to my table.

Is this is it? Or will I need to do anything else to be able to save each
individual record?
 
J

John Spencer

Yes, you need to add the fields to the table.

If your form is based on the table (and not a query of the table) the fields
should become available. If your form is based on a query (which I think is
best), then you will probably need to open the query and add the fields to
the query.

You can open the query by clicking on the small button next to record source
in the form's property dialog.

Tables (and fields) are for storing data
Queries are for selecting data that is stored in tables
Forms are for displaying, entering, and changing data from queries or tables
Reports are for printing data

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
R

Rhianne

I have added the fields into my table and they are now bound fields. However,
is it best for me to also create a query as well?

Thanks!
 
J

James Ivey

Hi Rhianne,

I am very new to Access as well.. just a couple of months into it. But I've
gotten lots of great help here in this newsgroup. Here is one piece of
advice I followed (someone please correct me if I'm wrong!):

For my simple membership database I have just one table and one query (at
the moment)

First, create your tables with all the fields you need
Second, create your queries based on your tables.
Third, create your forms based on your queries.

I was told its best to do it that way because it will be easier to maintain
when your database becomes more complex.

Hope that helps,
James
 
J

John W. Vinson

I have now successfully made all my field bound to my table.

Is this is it? Or will I need to do anything else to be able to save each
individual record?

Since you haven't said what you've done, nor how your form is set up, all I
can say is "I hope so".

If the Table is correctly set up with all the fields that you need, and each
of those fields is bound to a control on the form, then you do not need to do
anything extra to save records. Access will save the record as soon as you
move to a different record, close the form, or do something else to explicitly
save the record.

John W. Vinson [MVP]
 
J

John W. Vinson

I have added the fields into my table and they are now bound fields. However,
is it best for me to also create a query as well?

If you need one, yes; if you don't need one, no. It's very certain that as
your database develops you will be creating queries but whether you need one
right now isn't a question any of us, far away from your computer, can answer!

John W. Vinson [MVP]
 
R

Rhianne

well, what is the purpose of a query? If I knew that then I could decide if I
need one or not.
 
R

Rhianne

I have created a query, but it does not contain all the areas covered in my
table. Should I rectify this? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top