Hi,
This may be something simple, but I am having problems getting it to work in Access. I have a master product list in one table (with a autonumber primary key). I want to set up a data entry page that selects a subset of the data (based on Project and Account fields in the table), and assigns a Dept to the all the rows, and then allows a Amount and Description to be entered for each row. I then want to store only the rows were a value was entered into a new table.
I have set up a form with Project and Account listboxes, and I have a subform that displays the resulting data when the Project and Account are changed in the listbox. What I am having problemw with is adding the Amount and Description to each row in the subform (I put them there, but they were static - ie putting a 1 in the first row, resulted in all rows having a 1, etc).
I guess the question is what is the best method to accomplish this (I know it shouldn't be too complicated), and are there any samples that I could take a look at. What I think the inventory table should have is a autonumber key, a Dept (assigned from the form header - so that it doesn't have to be entered on each row), an Amount and Description for every row where a value is entered, and the primary key from my inventory listing, along with a date and userid from the form header.
I need help with working with the data in the subform (it is currently selected by setting the Row Source = to a SQL statement based on the values from the two combo boxes), but I am thinking that I might need to create a recordset in VBA and then use VBA to assign the rows where amount <>0 to the new table. Am I on the right track here?
Thanks,
Chris
This may be something simple, but I am having problems getting it to work in Access. I have a master product list in one table (with a autonumber primary key). I want to set up a data entry page that selects a subset of the data (based on Project and Account fields in the table), and assigns a Dept to the all the rows, and then allows a Amount and Description to be entered for each row. I then want to store only the rows were a value was entered into a new table.
I have set up a form with Project and Account listboxes, and I have a subform that displays the resulting data when the Project and Account are changed in the listbox. What I am having problemw with is adding the Amount and Description to each row in the subform (I put them there, but they were static - ie putting a 1 in the first row, resulted in all rows having a 1, etc).
I guess the question is what is the best method to accomplish this (I know it shouldn't be too complicated), and are there any samples that I could take a look at. What I think the inventory table should have is a autonumber key, a Dept (assigned from the form header - so that it doesn't have to be entered on each row), an Amount and Description for every row where a value is entered, and the primary key from my inventory listing, along with a date and userid from the form header.
I need help with working with the data in the subform (it is currently selected by setting the Row Source = to a SQL statement based on the values from the two combo boxes), but I am thinking that I might need to create a recordset in VBA and then use VBA to assign the rows where amount <>0 to the new table. Am I on the right track here?
Thanks,
Chris