Bound Column in Form

  • Thread starter Thread starter TT
  • Start date Start date
T

TT

I created a combo box(unbound), which holds two fields
(Issue Number and Issue Date) in a table. At the end of
the form, a user can create a report, which consists of
values in this form.

Right now, I can retrieve one value(Issue Number)from
this combo box since I have to specify only one field to
be bound to this combo box. But, I also want to retrieve
Issue Date.

Is there any way I can retrieve this data on the report?
 
I created a combo box(unbound), which holds two fields
(Issue Number and Issue Date) in a table. At the end of
the form, a user can create a report, which consists of
values in this form.

Right now, I can retrieve one value(Issue Number)from
this combo box since I have to specify only one field to
be bound to this combo box. But, I also want to retrieve
Issue Date.

Is there any way I can retrieve this data on the report?


I assume the user selects the IssueNumber and you wish to also display
the IssueDate.

Add a control to the form.
Code the AfterUpdate event of the ComboBox:
Me![ControlName] = Me!ComboName.Column(1)
Note that the Columns are zero based so the second column is
column(1).
 
Thank you for your reply, Fred.
I tried what you wrote, but didn't work.
I may not doing what I am supposed to do.
So, I hope you can stick with my problem a little bit more.
I wrote exact code in After_update procedure, and selected
column(1)as you advised. I replaced "Control Name
with "Name" of the hiddenTextbox in the form. By the way,
Control source is empty since I don't know what to type in
here. Do I need to enter something, such as name of the
field that I want this hiddenTextBox to be?
-----Original Message-----
I created a combo box(unbound), which holds two fields
(Issue Number and Issue Date) in a table. At the end of
the form, a user can create a report, which consists of
values in this form.

Right now, I can retrieve one value(Issue Number)from
this combo box since I have to specify only one field to
be bound to this combo box. But, I also want to retrieve
Issue Date.

Is there any way I can retrieve this data on the report?


I assume the user selects the IssueNumber and you wish to also display
the IssueDate.

Add a control to the form.
Code the AfterUpdate event of the ComboBox:
Me![ControlName] = Me!ComboName.Column(1)
Note that the Columns are zero based so the second column is
column(1).
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
See The ACCESS Web for examples of the method that fredg has given to you:
http://www.mvps.org/access/forms/frm0058.htm

--

Ken Snell
<MS ACCESS MVP>
TT said:
Thank you for your reply, Fred.
I tried what you wrote, but didn't work.
I may not doing what I am supposed to do.
So, I hope you can stick with my problem a little bit more.
I wrote exact code in After_update procedure, and selected
column(1)as you advised. I replaced "Control Name
with "Name" of the hiddenTextbox in the form. By the way,
Control source is empty since I don't know what to type in
here. Do I need to enter something, such as name of the
field that I want this hiddenTextBox to be?
-----Original Message-----
I created a combo box(unbound), which holds two fields
(Issue Number and Issue Date) in a table. At the end of
the form, a user can create a report, which consists of
values in this form.

Right now, I can retrieve one value(Issue Number)from
this combo box since I have to specify only one field to
be bound to this combo box. But, I also want to retrieve
Issue Date.

Is there any way I can retrieve this data on the report?


I assume the user selects the IssueNumber and you wish to also display
the IssueDate.

Add a control to the form.
Code the AfterUpdate event of the ComboBox:
Me![ControlName] = Me!ComboName.Column(1)
Note that the Columns are zero based so the second column is
column(1).
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Totally forgot about this web site to check my problem.
Thanks for reminding me of this site.
I did exactly as it said. But still getting "Error:450".
I stop debug and go back to Access, then the
hiddentextbox is already filled with the value as it's
supposed to be. If this error doesn't occur, everything
should be fine.
I entered
=[StartingIssue].[Column](1)
in control source of the hidden text box.

And I wrote this code for the combo box afterUpdate.
Private Sub StartingIssue_AfterUpdate()
Me![StartingIssueDate].Value = Me![StartingIssue].
[Column](1)
End Sub

I tried with and without [], but didn't work. Also tried
without .value but didn't work.
-----Original Message-----
See The ACCESS Web for examples of the method that fredg has given to you:
http://www.mvps.org/access/forms/frm0058.htm

--

Ken Snell
<MS ACCESS MVP>
Thank you for your reply, Fred.
I tried what you wrote, but didn't work.
I may not doing what I am supposed to do.
So, I hope you can stick with my problem a little bit more.
I wrote exact code in After_update procedure, and selected
column(1)as you advised. I replaced "Control Name
with "Name" of the hiddenTextbox in the form. By the way,
Control source is empty since I don't know what to type in
here. Do I need to enter something, such as name of the
field that I want this hiddenTextBox to be?
-----Original Message-----
On Fri, 17 Sep 2004 16:12:56 -0700, TT wrote:

I created a combo box(unbound), which holds two fields
(Issue Number and Issue Date) in a table. At the end of
the form, a user can create a report, which consists of
values in this form.

Right now, I can retrieve one value(Issue Number) from
this combo box since I have to specify only one
field
to
be bound to this combo box. But, I also want to retrieve
Issue Date.

Is there any way I can retrieve this data on the report?


I assume the user selects the IssueNumber and you
wish to
also display
the IssueDate.

Add a control to the form.
Code the AfterUpdate event of the ComboBox:
Me![ControlName] = Me!ComboName.Column(1)
Note that the Columns are zero based so the second
column
is
column(1).
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.


.
 
Either use the ControlSource expression approach and no code, or leave the
ControlSource empty and use the code. You cannot do both.

If a control has an expression in its ControlSource, you cannot change the
value of that control using code.
--

Ken Snell
<MS ACCESS MVP>


TT said:
Totally forgot about this web site to check my problem.
Thanks for reminding me of this site.
I did exactly as it said. But still getting "Error:450".
I stop debug and go back to Access, then the
hiddentextbox is already filled with the value as it's
supposed to be. If this error doesn't occur, everything
should be fine.
I entered
=[StartingIssue].[Column](1)
in control source of the hidden text box.

And I wrote this code for the combo box afterUpdate.
Private Sub StartingIssue_AfterUpdate()
Me![StartingIssueDate].Value = Me![StartingIssue].
[Column](1)
End Sub

I tried with and without [], but didn't work. Also tried
without .value but didn't work.
-----Original Message-----
See The ACCESS Web for examples of the method that fredg has given to you:
http://www.mvps.org/access/forms/frm0058.htm

--

Ken Snell
<MS ACCESS MVP>
Thank you for your reply, Fred.
I tried what you wrote, but didn't work.
I may not doing what I am supposed to do.
So, I hope you can stick with my problem a little bit more.
I wrote exact code in After_update procedure, and selected
column(1)as you advised. I replaced "Control Name
with "Name" of the hiddenTextbox in the form. By the way,
Control source is empty since I don't know what to type in
here. Do I need to enter something, such as name of the
field that I want this hiddenTextBox to be?

-----Original Message-----
On Fri, 17 Sep 2004 16:12:56 -0700, TT wrote:

I created a combo box(unbound), which holds two fields
(Issue Number and Issue Date) in a table. At the end of
the form, a user can create a report, which consists of
values in this form.

Right now, I can retrieve one value(Issue Number) from
this combo box since I have to specify only one field
to
be bound to this combo box. But, I also want to
retrieve
Issue Date.

Is there any way I can retrieve this data on the report?


I assume the user selects the IssueNumber and you wish to
also display
the IssueDate.

Add a control to the form.
Code the AfterUpdate event of the ComboBox:
Me![ControlName] = Me!ComboName.Column(1)
Note that the Columns are zero based so the second column
is
column(1).
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.


.
 
Back
Top