A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Adding a new record to a FORM



 
 
Thread Tools Display Modes
  #1  
Old September 1st, 2006, 03:18 PM posted to microsoft.public.access.forms
jac007
external usenet poster
 
Posts: 28
Default Adding a new record to a FORM

I have a FORM that has many checkboxes. Everytime a check a check box it
refreshes the FORM and adds all the checkboxes that are being checked into a
field. But, when I add a new record and check a checkbox, after I have
checked the checkbox it goes back to the first record. How can I add new
records and checking checkboxes without it always going back to the first
record.
  #2  
Old September 1st, 2006, 04:08 PM posted to microsoft.public.access.forms
Martin J
external usenet poster
 
Posts: 1
Default Adding a new record to a FORM

I havent figured out how to stop it going to the first record. However when I
update a record I save the # then after update set focus on record # and use
docmd.findrecord record#.
--
HTH
Martin J


"jac007" wrote:

I have a FORM that has many checkboxes. Everytime a check a check box it
refreshes the FORM and adds all the checkboxes that are being checked into a
field. But, when I add a new record and check a checkbox, after I have
checked the checkbox it goes back to the first record. How can I add new
records and checking checkboxes without it always going back to the first
record.

  #3  
Old September 1st, 2006, 06:44 PM posted to microsoft.public.access.forms
John Vinson
external usenet poster
 
Posts: 4,033
Default Adding a new record to a FORM

On Fri, 1 Sep 2006 07:18:01 -0700, jac007
wrote:

I have a FORM that has many checkboxes. Everytime a check a check box it
refreshes the FORM and adds all the checkboxes that are being checked into a
field. But, when I add a new record and check a checkbox, after I have
checked the checkbox it goes back to the first record. How can I add new
records and checking checkboxes without it always going back to the first
record.


There's something very odd about this: this is NOT normal behavior.
What is the structure of your Table? Does it have a lot of yes/no
fields? If so your table structure may need normalization. Is it
jumping to the new record when you check the last checkbox in the
form's Tab Order? If so, try setting the Form's Cycle property to
"Same Record". And can you explain what you mean by "adding all the
checkboxes... into a field"? a single field should not contain
multiple values!

John W. Vinson[MVP]
  #4  
Old September 1st, 2006, 07:19 PM posted to microsoft.public.access.forms
jac007
external usenet poster
 
Posts: 28
Default Adding a new record to a FORM

The checkboxes in my FORM are from fields that are in a Table. These are
yes/no values because I am keeping track to see if something is missing or
not so that's why the checkboxes. There is another field on the table that is
on my FORM that tracks how many checkboxes are being checked, so it sums up
the total. Anyway, that works fine, but when I want to add a record and click
on a checkbox, the FORM jumps back to the begining. When i go to the last
record i see the new record that I just added with the checkboxed checked
which is fine, but I don't want to keep going to the last record to finish up
the data entry each time I want to add a new record.

"John Vinson" wrote:

On Fri, 1 Sep 2006 07:18:01 -0700, jac007
wrote:

I have a FORM that has many checkboxes. Everytime a check a check box it
refreshes the FORM and adds all the checkboxes that are being checked into a
field. But, when I add a new record and check a checkbox, after I have
checked the checkbox it goes back to the first record. How can I add new
records and checking checkboxes without it always going back to the first
record.


There's something very odd about this: this is NOT normal behavior.
What is the structure of your Table? Does it have a lot of yes/no
fields? If so your table structure may need normalization. Is it
jumping to the new record when you check the last checkbox in the
form's Tab Order? If so, try setting the Form's Cycle property to
"Same Record". And can you explain what you mean by "adding all the
checkboxes... into a field"? a single field should not contain
multiple values!

John W. Vinson[MVP]

  #5  
Old September 1st, 2006, 10:40 PM posted to microsoft.public.access.forms
John Vinson
external usenet poster
 
Posts: 4,033
Default Adding a new record to a FORM

On Fri, 1 Sep 2006 11:19:02 -0700, jac007
wrote:

The checkboxes in my FORM are from fields that are in a Table. These are
yes/no values because I am keeping track to see if something is missing or
not so that's why the checkboxes.


That sounds like bad design. If you ever need to add something else to
track, you'll need to revise your Table structure, all your Forms, all
your Queries. Might this not be better modeled as a many to many
relationship, with three tables?

YourTable
YourID Primary Key

ThingsToCheck
CheckpointNo Primary Key
Description

Checklist
YourID link to YourTable
CheckpointNo link to ThingsToCheck

You'ld just add records to Checklist as each item is checked, and use
an Unmatched query to identify those things that have not been
checked.

There is another field on the table that is
on my FORM that tracks how many checkboxes are being checked, so it sums up
the total.


This field should certainly NOT exist in your table, since it can be
calculated (by counting checkbox values, or a Totals query counting
records in Checklist if you revise the structure). It's redundant, and
the value in the field could be WRONG, since you have no way to ensure
that it changes when the checkboxes do.

Anyway, that works fine, but when I want to add a record and click
on a checkbox, the FORM jumps back to the begining. When i go to the last
record i see the new record that I just added with the checkboxed checked
which is fine, but I don't want to keep going to the last record to finish up
the data entry each time I want to add a new record.


I have NO idea how your form is structured or why it's doing this. Do
you have a form with a subform???

John W. Vinson[MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:00 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.