I attached an image, I got it working but its doing something funny. It was subform record source not point to the table. If you can take a look at the attached image, that would be awesome.
When you design the form you need to shrink the form all the way down to the height of the textboxes if not you will get space below them. That is what the space looks like. There was an extra textbox on the form called textbox_focus. It is no longer needed so you can get rid of it. I think that is the thing that is floating. I was very small and to the right of the form.
ensure you are using the updated code that deletes all the rows. Also ensure the suborm is set allow additions to false, allow deletions to false, allow edits to true.
This is why it would be really helpful if you could explain in detail what is your goal and how this is planned to be used. A different design may have been needed.
If you want three columns of comboboxes, you probably can do it this way. If you want just three comboboxes this design will not support that. Instead you would have needed to do the other design with just a bunch of unbound text boxes. You will have to explain this better. Where does the data get stored and where do you want it displayed. Originally this was a harder issue because you had a variable amount of rows and columns. But if the columns are fixed and do not have to resize than this problem may have been easier to just have a a bunch of unbound textboxes. To get the best solution you need to put some time into detailing your requirements and explaining the use.
@Spam - why can't you share the purpose of this very strange request?
Everyone on here has asked, but you seem very reluctant to enlighten us?
MajP has been very accommodating in helping you so far without knowing the end goal of his efforts.
Well you hadn't really explained that at all - I re-read the thread, and there is little to no explanation.
The normal approach here would be to store the "Potential order" or "quote" lines with a flag or unfilled out field to indicate that it hadn't been confirmed. The calculations can be part of the form.
If the client proceeds you simply update the potential order by updating a ConfirmedDate or similar per order line. No need to do any more or less. You have a record of what you quoted and the quantities, and it's a simple matter to move it forwards to an actual order.
If this isn't what you need it to do please describe the whole process so we can make sensible suggestions.
As I previously said you are going to have to explain in detail what that means and how this is supposed to work. If you mean three entire columns of comboboxes that is one thing and you would simply change the first three bound controls. If you mean only three controls within the Nx10 grid, there is no way without totally redesigning how this is done. You would have to go with a completely unbound solution.
I see now, I think kind of understand you. All of column one txt boxes will be combobox that points to the stored data in a table. Same thing for column 3 and 4 will be combobox with a value, list like what you did for the combo box displaying 1 through 10. The last 8th column will be any number enter. I need a separate text on the going a single add all the values in 8 column textboxes.
click on txt1 and right click. Select "Change To" select "Combo Box". Do that for txt3 and txt4. In the procedure FormatTable change
Code:
Dim ctl As Access.TextBox
to
Code:
Dim ctl As Access.Control
However, this sounds stranger and stranger. At first it was a "scratch pad" table of any number of columns and rows. Now it simply looks like a generic orders query of known fields.
it just select items a client order. Then last fields adds up all the quantities
I know you feel that you have articulated well what the purpose and use is, but you really have not. You seem to get offended when people ask for more detail. This is like going to a doctor and telling him what medicines to prescribe, without being willing to explain the symptoms and go through a check up. You have not explained the data, tables, how the users enters data, etc. If you spend some time explaining it better, I am sure we can come up with a much simpler, efficient solution.
If you posted a small db with some data and explained the desired use and results, instead of prescribing a solution that would help.