P
pclis007 via AccessMonster.com
My situation: IE: My form is comprised of a cmd button grid, A1 thru D10.
When you click on cmdButton A1, it populates a cell ([txtGrid]) on the form
with the value "A1". I have a standalone query ([qryCellProduct]) that
bases it's filter off of the contents of [txtGrid], using the following
statement in the [CellLocation] field:
[Forms]![frmVendingMachine]![txtGrid]
The results of the query show data including a product assigned to that
cell, and the cell grid number.
What I need to do is somehow populate [txtProduct] on the same form with the
results of the query. Note: The query cannot get results until after that
cmdButton is clicked. I don't know how to call a query using VBA, otherwise
I would do that in the OnClick event of the cmdButton, IE:
Private Sub cmdA1_Click()
Me!txtGrid.Value = "A1"
If IsNull(txtGrid) = False Then
Me!txtProduct.Value = qryCellProduct!product
Any ideas?
Thanks,
Perry
When you click on cmdButton A1, it populates a cell ([txtGrid]) on the form
with the value "A1". I have a standalone query ([qryCellProduct]) that
bases it's filter off of the contents of [txtGrid], using the following
statement in the [CellLocation] field:
[Forms]![frmVendingMachine]![txtGrid]
The results of the query show data including a product assigned to that
cell, and the cell grid number.
What I need to do is somehow populate [txtProduct] on the same form with the
results of the query. Note: The query cannot get results until after that
cmdButton is clicked. I don't know how to call a query using VBA, otherwise
I would do that in the OnClick event of the cmdButton, IE:
Private Sub cmdA1_Click()
Me!txtGrid.Value = "A1"
If IsNull(txtGrid) = False Then
Me!txtProduct.Value = qryCellProduct!product
Any ideas?
Thanks,
Perry