N
newbiesupreme
In a form, I am trying to:
1) Have a scrollable multi-row subform that has, let's say, 10 rows total,but shows 5, and the subform can be scrolled down to see the other 5. Thefields that comprise each row are: a Combobox that looks up Social Security Number in Table A, Name, address, and salary. Name, Address, and Salaryare 3 fields from Table A (there are many other fields in Table A; this subform only shows 3)
2) The combobox in each row of this 10-row subform would, afterupdate, load the current values for a record that matches that combobox value in the rest of the fields (e.g. user chooses social secuity number, and the matching record from Table A populates the Name, Address, and salary fields in therow where user used the combobox)
3) User would then make a change to any or all of the 3 fields (Name, Address, Salary), and would repeat this process for up to ten records (recall that this subform shows 10 rows)
4) Upon clicking a button, Access would see if any of the values in each record were changed (comparing their current value to the value in Table A for that record), and if they were, create a NEW record in Table A that is acopy of the record that was looked up, but with the changed values from this subform
So you see, a bound form won't work, as I don't want to CHANGE any of the current data in the table, I just want to COPY a record if there was a change made to any of those 3 fields, and the new record would have these changed values in their respective fields.
My idea was to actually use a bound form, but have the bound fields invisible, and their only purp;ose would be to set the initial value of the UNBound fields. But I can't get the combobox to work for all rows (that's a typical problem, and I've seen the solution to it for bound forms, but not thisparticular scenatio of mine).
I'm familiar with the VBA editor.
Any help, ideas, or code for this would be greatly appreciated. It's also possible I'm going about this completely the wrong way, so if you think there's a better aproach, please let me know; I'm just trying to make it possible for a user to make changes to specific fields via a multi-row form interface (I don't want to use one combobox in a form header to do one at a time; it would be too tedious), and any change would actually be a new record,with all data the same except for the changes made by the user.
Again, thanks for any help and for reading.
1) Have a scrollable multi-row subform that has, let's say, 10 rows total,but shows 5, and the subform can be scrolled down to see the other 5. Thefields that comprise each row are: a Combobox that looks up Social Security Number in Table A, Name, address, and salary. Name, Address, and Salaryare 3 fields from Table A (there are many other fields in Table A; this subform only shows 3)
2) The combobox in each row of this 10-row subform would, afterupdate, load the current values for a record that matches that combobox value in the rest of the fields (e.g. user chooses social secuity number, and the matching record from Table A populates the Name, Address, and salary fields in therow where user used the combobox)
3) User would then make a change to any or all of the 3 fields (Name, Address, Salary), and would repeat this process for up to ten records (recall that this subform shows 10 rows)
4) Upon clicking a button, Access would see if any of the values in each record were changed (comparing their current value to the value in Table A for that record), and if they were, create a NEW record in Table A that is acopy of the record that was looked up, but with the changed values from this subform
So you see, a bound form won't work, as I don't want to CHANGE any of the current data in the table, I just want to COPY a record if there was a change made to any of those 3 fields, and the new record would have these changed values in their respective fields.
My idea was to actually use a bound form, but have the bound fields invisible, and their only purp;ose would be to set the initial value of the UNBound fields. But I can't get the combobox to work for all rows (that's a typical problem, and I've seen the solution to it for bound forms, but not thisparticular scenatio of mine).
I'm familiar with the VBA editor.
Any help, ideas, or code for this would be greatly appreciated. It's also possible I'm going about this completely the wrong way, so if you think there's a better aproach, please let me know; I'm just trying to make it possible for a user to make changes to specific fields via a multi-row form interface (I don't want to use one combobox in a form header to do one at a time; it would be too tedious), and any change would actually be a new record,with all data the same except for the changes made by the user.
Again, thanks for any help and for reading.