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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|