MajP
You've got your good things, and you've got mine.
- Local time
- Today, 17:00
- Joined
- May 21, 2018
- Messages
- 8,533
Is it possible instead of having a cmd btn is to use a cbo base on selected value?
Dim frm As Form_frmFakeTable
Set frm = Me.frmFakeTable.Form
If IsNumeric(Me.txtRows) And IsNumeric(Me.txtColumns) Then
frm.FormatTable Me.txtRows, Me.txtColumns
End If
This demos the combos and fixes the issue.
is it possible to do a set number of columns such as 10, and one combo box that creates the rows?
frm.FormatTable Me.cboRows, Me.cboColumns
frm.FormatTable Me.cboRows, 10
The fields in tblGrid are text fields. If you changed them to numeric you would get that error. If you look at the update I sent you, it simplified the code by just deleting all the records instead of leaving a record in the table. That code is no longer there.Now I am getting Data Type Conversion Error 3421. It highlights fld = ""
Sure just hardwire the value you want
to something likeCode:frm.FormatTable Me.cboRows, Me.cboColumns
However if the number of columns was to be set then the code could have been written far simpler. You would not have to resize and move the columns like is currently done.Code:frm.FormatTable Me.cboRows, 10
The fields in tblGrid are text fields. If you changed them to numeric you would get that error. If you look at the update I sent you, it simplified the code by just deleting all the records instead of leaving a record in the table. That code is no longer there.
Sure just hardwire the value you want
to something likeCode:frm.FormatTable Me.cboRows, Me.cboColumns
However if the number of columns was to be set then the code could have been written far simpler. You would not have to resize and move the columns like is currently done.Code:frm.FormatTable Me.cboRows, 10
The fields in tblGrid are text fields. If you changed them to numeric you would get that error. If you look at the update I sent you, it simplified the code by just deleting all the records instead of leaving a record in the table. That code is no longer there.
Ensure the subform control is called InventorySub. Its name may be different from the object within the subform control. Must click on very outside of control.
When you type this line
Set frm = Me.
Does "inventorysub" appear in the intellisense.
or if
you type INVENTORYSUB will it automatically correct to InventorySub after finishing the line?