Creating a table similar to word in access form (1 Viewer)

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:21
Joined
May 21, 2018
Messages
8,463
Post your DB. The only other guess is that the source object in the subform control is not Form InventorySub.
 

Spam808

Registered User.
Local time
Today, 02:21
Joined
Dec 3, 2018
Messages
55
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.
 

Attachments

  • Capture.JPG
    Capture.JPG
    28 KB · Views: 61

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:21
Joined
May 21, 2018
Messages
8,463
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.
 

Spam808

Registered User.
Local time
Today, 02:21
Joined
Dec 3, 2018
Messages
55
Thanks that issue is fixed, now for some even those I haven't selected a row. It is showing the first row everytime I open the form.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:21
Joined
May 21, 2018
Messages
8,463
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.
 

Spam808

Registered User.
Local time
Today, 02:21
Joined
Dec 3, 2018
Messages
55
Thank you so much your help :)
1. Would I be able to change the change 3 of the textbox to a combo box, and display stored data?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:21
Joined
May 21, 2018
Messages
8,463
1. Would I be able to change the change 3 of the textbox to a combo box, and display stored data?
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.
 

Minty

AWF VIP
Local time
Today, 09:21
Joined
Jul 26, 2013
Messages
10,355
@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.
 

Spam808

Registered User.
Local time
Today, 02:21
Joined
Dec 3, 2018
Messages
55
@MajP, I just need 3 combo boxes.

@Minty The purpose I ready explained early it just select items a client order. Then last fields adds up all the quantities.
 

Minty

AWF VIP
Local time
Today, 09:21
Joined
Jul 26, 2013
Messages
10,355
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.
 

Spam808

Registered User.
Local time
Today, 02:21
Joined
Dec 3, 2018
Messages
55
MajP is helping, and created what I am looking for. Just needs a few minor tweeking.
 

Spam808

Registered User.
Local time
Today, 02:21
Joined
Dec 3, 2018
Messages
55
Minty take a look the file majP created faketable_v2.
 

Spam808

Registered User.
Local time
Today, 02:21
Joined
Dec 3, 2018
Messages
55
MajP, how would I able to change a field to a combobox?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:21
Joined
May 21, 2018
Messages
8,463
MajP, how would I able to change a field to a combobox?
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.
 

Spam808

Registered User.
Local time
Today, 02:21
Joined
Dec 3, 2018
Messages
55
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.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:21
Joined
May 21, 2018
Messages
8,463
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.
 

Users who are viewing this thread

Top Bottom