Text Box Data Source Not Working

  • Thread starter Thread starter Ken Hudson
  • Start date Start date
K

Ken Hudson

I am using Access 2003.
I have a subform with a text box ([cboPOID]) that uses a query to retrieve
data from a table.

SELECT tblPOs.pkPOID, tblPOs.txtPONo, tblPOs.fkProjID, tblPOs.curPOAmt,
tblPOs.txtDescr, tblPOs.memComments, tblPOs.txtBFY, tblPOs.txtStn FROM tblPOs
WHERE (((tblPOs.fkProjID)=Forms!frmProjectsEdit!pkProjID));

On that subform I have several other text boxes that get their data from the
text box ([cboPOID]) that runs the query. Their data source is:
=cboPOID.column(3), =cboPOID.column(4), etc.

I am now trying to set up another text box, but when I type in
"=cboPOID.column(5)" and hit return, the code changes to
"=[cboPOID].[column](5)" and obviously doesn't work.

Any ideas what I may have done to incur this behavior?
 
What is the value of ColumnCount property for the cboPOID control? If it's
not at least 6, then you cannot read the .Column(5) value from it.
 
I am using Access 2003.
I have a subform with a text box ([cboPOID]) that uses a query to
retrieve data from a table.

SELECT tblPOs.pkPOID, tblPOs.txtPONo, tblPOs.fkProjID,
tblPOs.curPOAmt, tblPOs.txtDescr, tblPOs.memComments,
tblPOs.txtBFY, tblPOs.txtStn FROM tblPOs WHERE
(((tblPOs.fkProjID)=Forms!frmProjectsEdit!pkProjID));

On that subform I have several other text boxes that get their
data from the text box ([cboPOID]) that runs the query. Their data
source is: =cboPOID.column(3), =cboPOID.column(4), etc.

I am now trying to set up another text box, but when I type in
"=cboPOID.column(5)" and hit return, the code changes to
"=[cboPOID].[column](5)" and obviously doesn't work.

Any ideas what I may have done to incur this behavior?
=[cboPOID].[column](n) happens on my machine, all textboxes base on
a combo. but it works here. Could it be the fact that, judging by
your naming convention, that tblPOs.memComments is a memo field, and
not a text field?
 
Hi Ken,
Thanks for the reply.
The column count is 8.

--
Ken Hudson


Ken Snell MVP said:
What is the value of ColumnCount property for the cboPOID control? If it's
not at least 6, then you cannot read the .Column(5) value from it.

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


Ken Hudson said:
I am using Access 2003.
I have a subform with a text box ([cboPOID]) that uses a query to retrieve
data from a table.

SELECT tblPOs.pkPOID, tblPOs.txtPONo, tblPOs.fkProjID, tblPOs.curPOAmt,
tblPOs.txtDescr, tblPOs.memComments, tblPOs.txtBFY, tblPOs.txtStn FROM
tblPOs
WHERE (((tblPOs.fkProjID)=Forms!frmProjectsEdit!pkProjID));

On that subform I have several other text boxes that get their data from
the
text box ([cboPOID]) that runs the query. Their data source is:
=cboPOID.column(3), =cboPOID.column(4), etc.

I am now trying to set up another text box, but when I type in
"=cboPOID.column(5)" and hit return, the code changes to
"=[cboPOID].[column](5)" and obviously doesn't work.

Any ideas what I may have done to incur this behavior?
 
Well, perhaps I didn't go far enough.
The syntax about which I was concerned seems to only appear when I first set
up the control in form design view. After I close the form, save it and
re-open the form in design view, the syntax "converts" to the expected format.
It works as expected.
Sorry to trouble you.
Thanks for the input.
 
Back
Top