From: KSmith on
Man you may have 'Made My Day'; I'm not using a query! I am trying to do
this by using the tables. Does this make a difference?

My only experence prior to this was command line dBaseIV programming, and I
didn't use queries.

If you use a query and update a field via a form, does it update the table
without any additional programming?

I have played around making queries and know how to do it, but really didn't
see the need. Before (in dBaseIV) I just find the correct record and
replaced the field in question with whatever needed to be their.

And again, Thanks a lot for your help.
--
KSmith


"Marshall Barton" wrote:

> KSmith wrote:
>
> >I'm still having trouble with this form. The form that I copied from works
> >great.
> >It's like I get one thing to working and something else screws up. Is there
> >an in-correct way to copy a form?
> >
> >Here is what I done to get where I am today.
> >
> >I clicked on 'without opening' the 1st form.
> >Pressed 'Ctrl C'
> >Pressed 'Ctrl V'
> >And re-named the form in the dialog box.
> >
> >Changed the Record Source Line of the 2nd form.
> >Renamed the text boxes of the ones that changed, some stayed the same.
> >Most of the text boxes are bound to a field in the two main tables.
> >
> >This is crazy. I don't understand why it works in one form but not in
> >another.
> >
> >Is there a 'special way' that I need to be calling a text box from the form?
>
>
> That's the standard way to copy an object in the db window.
>
> If you change the name of something, then you need to find
> and change everything that referred to the something.
>
> If you changed the record source query, make sure that all
> the fields used in bound controls are correct and still in
> the query.
>
> Did you copy the constructed query into a new query's SQL
> view and verify that the query works as expected?
>
> I don't see why you felt the need to change the name of any
> control.
>
> --
> Marsh
> MVP [MS Access]
> .
>
From: Marshall Barton on
KSmith wrote:

>Man you may have 'Made My Day'; I'm not using a query! I am trying to do
>this by using the tables. Does this make a difference?

No, not really. You can usually think of a query as a
virtual table so if the form's bound controls are bound to
fields in the record source table, then fine. But if you
used a different table, presumably it has different fields
and you need to make sure the bound controls in the copied
form are changed to refer to the different record source
fields. If you have a control that's bound to a field that
is not in the record source, you should see #Name in the
control when the form is opened.


>My only experence prior to this was command line dBaseIV programming, and I
>didn't use queries.
>
>If you use a query and update a field via a form, does it update the table
>without any additional programming?

Generally, Yes. I almost always use a query as a form's
record source for two reasons. I want to see dome values
from more than one table and a query is how you sort a
form's records. A caveat to that is if the form's record
source is a query that includes fields from more than one
table the many side table's fields may not be updatable.

>
>I have played around making queries and know how to do it, but really didn't
>see the need. Before (in dBaseIV) I just find the correct record and
>replaced the field in question with whatever needed to be their.

Well, I've tried to explain some general things, but I still
have no idea what is actually causing problems in your
copied form.

--
Marsh
MVP [MS Access]
From: KSmith on
Thanks for all of you help and patience.
I took a closer look at the form that is working and compared it to the one
that wasn't.

I made some errors.

On the form that works I refer to the control names in the code. In the one
that wasn't working I did a combination of both. I was calling the control
name in some places and the field name in others by using “FieldName_tblName”
or “tblName.FieldName” .

I think it was confusing to Access, I know I was!

Again, Thank you for your time and patience.

--
KSmith


"Marshall Barton" wrote:

> KSmith wrote:
>
> >Man you may have 'Made My Day'; I'm not using a query! I am trying to do
> >this by using the tables. Does this make a difference?
>
> No, not really. You can usually think of a query as a
> virtual table so if the form's bound controls are bound to
> fields in the record source table, then fine. But if you
> used a different table, presumably it has different fields
> and you need to make sure the bound controls in the copied
> form are changed to refer to the different record source
> fields. If you have a control that's bound to a field that
> is not in the record source, you should see #Name in the
> control when the form is opened.
>
>
> >My only experence prior to this was command line dBaseIV programming, and I
> >didn't use queries.
> >
> >If you use a query and update a field via a form, does it update the table
> >without any additional programming?
>
> Generally, Yes. I almost always use a query as a form's
> record source for two reasons. I want to see dome values
> from more than one table and a query is how you sort a
> form's records. A caveat to that is if the form's record
> source is a query that includes fields from more than one
> table the many side table's fields may not be updatable.
>
> >
> >I have played around making queries and know how to do it, but really didn't
> >see the need. Before (in dBaseIV) I just find the correct record and
> >replaced the field in question with whatever needed to be their.
>
> Well, I've tried to explain some general things, but I still
> have no idea what is actually causing problems in your
> copied form.
>
> --
> Marsh
> MVP [MS Access]
> .
>
From: KSmith on
The crazy thing about this is the last thing you mentioned. The original
form works great! Briefly what the original form does is display info from
two tables. The text boxes that displays this are bound to the two main
tables. There are two other unbound text boxes that the user will enter data
into. There's a section of code that takes the unbound text box data, does a
calculation, and uses this calculation to subtract the calculated amount from
a field in the 'top' table and add this amount to a field in the 'bottom'
table.

There is a section of code that appends some of the bound and unbound text
box data to another table for tracking purposes.

The original works and the copy doesn't.

There must be something that I don't have set correctly.

Anyway thanks for the help. If I figure it out I will post what I find.

--
KSmith


"Marshall Barton" wrote:

> KSmith wrote:
>
> >Man you may have 'Made My Day'; I'm not using a query! I am trying to do
> >this by using the tables. Does this make a difference?
>
> No, not really. You can usually think of a query as a
> virtual table so if the form's bound controls are bound to
> fields in the record source table, then fine. But if you
> used a different table, presumably it has different fields
> and you need to make sure the bound controls in the copied
> form are changed to refer to the different record source
> fields. If you have a control that's bound to a field that
> is not in the record source, you should see #Name in the
> control when the form is opened.
>
>
> >My only experence prior to this was command line dBaseIV programming, and I
> >didn't use queries.
> >
> >If you use a query and update a field via a form, does it update the table
> >without any additional programming?
>
> Generally, Yes. I almost always use a query as a form's
> record source for two reasons. I want to see dome values
> from more than one table and a query is how you sort a
> form's records. A caveat to that is if the form's record
> source is a query that includes fields from more than one
> table the many side table's fields may not be updatable.
>
> >
> >I have played around making queries and know how to do it, but really didn't
> >see the need. Before (in dBaseIV) I just find the correct record and
> >replaced the field in question with whatever needed to be their.
>
> Well, I've tried to explain some general things, but I still
> have no idea what is actually causing problems in your
> copied form.
>
> --
> Marsh
> MVP [MS Access]
> .
>