I have the following problem:
Situation: Access 2000 database with VBA code.
Depending on the 'grade' of our product, we need to enter the weight of some sieves we use on a regular base. I now have a form in wich you can select the 'grade' in a listbox, and then it sets the recordsource for the form to the table with the weights for that grade. Now, I just found out that we have multiple sieves per grade, and that each sieve has its own unique number. I figured that I'd make another combo-box where you can enter or choose the sievenumber (called BMA nr) and then enter the weight of the sieve.
but how do I do that? I suspect i need to make a query, and that will work with just reading old data, but what happens if someone needs to enter a new BMA nr. with new sieve weights?
Here's what I have now:
Expand|Select|Wrap|Line Numbers
- Private Sub SieveGrade_Change()
- Select Case SieveGrade.Value
- Case "1"
- Form_frmUCLeeggewichtZeven.RecordSource = "UC_LeeggewichtZeef"
- Case "2"
- Form_frmUCLeeggewichtZeven.RecordSource = "MG_LeeggewichtZeef"
- Case "3"
- Form_frmUCLeeggewichtZeven.RecordSource = "PF_LeeggewichtZeef"
- Case "4"
- Form_frmUCLeeggewichtZeven.RecordSource = "GP_LeeggewichtZeef"
- Case "5"
- Form_frmUCLeeggewichtZeven.RecordSource = "PFDryer_LeeggewichtZeef"
- Case Else
- MsgBox "Error!", vbCritical
- Exit Sub
- End Select
- End Sub
Anyone with some cool tips/advice/code, please please please? :)
Regards,
Jasper