Firstly I am a self taught AccessVB Programmer
This means that I have probably missed something, but I have been through all the FAQs and trawled the web and cannot find out if what I am trying to do is just stupid or possible.
What I am trying to do is populate a subform with a number of items from a couple of tables. So I created a pair of combi boxes and tried to use one to the other as described in the FAQs - works fine in form view - in datasheet view of course even though they are bound controls the whole column fills with the selected SQL query. To get around this I created a separate unbound field and cached my answer using an event and VB- so far so good but messy.
Then I have a number (5) fields in my table which need to be calculated based on the collated fields from the tables. I created them first with VBCode, but the trusty Me!control.column etc will work if I click on a row, but I I wanted to recalculate the whole table I need to find a way of marching through each record and then the Me!control will not work.
So then I tried creating a calculated control for each, the form works beautifully, trouble is I can't see a way of writing these controls back to the database because I don't know which row I am in. Again I am missing some key subform knowledge
It seems I have missed a fundamental piece of knowledge about datasheets as what I want to do would work in a form, but ideally I want the user to create a number of entries in a schedule.
Is someone willing to help me dig my way out of this, I am normally self motivated but I am starting to get buried here? Please turn the light on, I have spent a couple of days floundering.
Can someone help me to write calculated controls back to the row and field or?
Can I use VB to march through records and calculate each field as I need it?
Thanks for any and all advice
This means that I have probably missed something, but I have been through all the FAQs and trawled the web and cannot find out if what I am trying to do is just stupid or possible.
What I am trying to do is populate a subform with a number of items from a couple of tables. So I created a pair of combi boxes and tried to use one to the other as described in the FAQs - works fine in form view - in datasheet view of course even though they are bound controls the whole column fills with the selected SQL query. To get around this I created a separate unbound field and cached my answer using an event and VB- so far so good but messy.
Then I have a number (5) fields in my table which need to be calculated based on the collated fields from the tables. I created them first with VBCode, but the trusty Me!control.column etc will work if I click on a row, but I I wanted to recalculate the whole table I need to find a way of marching through each record and then the Me!control will not work.
So then I tried creating a calculated control for each, the form works beautifully, trouble is I can't see a way of writing these controls back to the database because I don't know which row I am in. Again I am missing some key subform knowledge
It seems I have missed a fundamental piece of knowledge about datasheets as what I want to do would work in a form, but ideally I want the user to create a number of entries in a schedule.
Is someone willing to help me dig my way out of this, I am normally self motivated but I am starting to get buried here? Please turn the light on, I have spent a couple of days floundering.
Can someone help me to write calculated controls back to the row and field or?
Can I use VB to march through records and calculate each field as I need it?
Thanks for any and all advice