A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

2nd list box not writing to text box



 
 
Thread Tools Display Modes
  #1  
Old February 28th, 2008, 04:09 PM posted to microsoft.public.access.forms
thezinman
external usenet poster
 
Posts: 2
Default 2nd list box not writing to text box

Can you please help me?

I'm trying to provide default points for activities for students on a form,
and modify the points field in a form.

I have a form with 2 list boxes on them.
The first list box, lboFirstName,
correctly displays the student's Last Name in the tboLastName text box
field,
using the Row Source property to run a query to pull the first name & last
name from the tblStudents table,
setting the Column Count = 2,
Column Widths = '1";0"',
Bound Column = 1
and using an AfterUpdate function call.

The second list box, lboActivity,
correctly displays the student activities from the tblActivity table,
BUT does not display the default Grade (points) in the tboPoints text box
field.
Here's the code:
Field Name: lboActivity
Control Source: Using Expression Builder = [tblActivity]![Activity
Description]
Row Source Type: Table/Query
Row Source: SELECT tblActivity.[Activity Description], tblActivity.[Activity
Points] FROM tblActivity ORDER BY tblActivity.[Activity Nbr];
Column Count: 2
Column Widths: '1";0"'
Bound Column: 1

The tboPoints Text Box Field shows "#Name?" in the form view as an error.

Please tell me what I'm doing wrong.
Thank you,
mrzin
  #2  
Old February 28th, 2008, 08:50 PM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default 2nd list box not writing to text box

Hi,
try this for the Control Source of tblPoints
= Me.lboActivity.Column(1)

Jeanette Cunningham

"thezinman" wrote in message
...
Can you please help me?

I'm trying to provide default points for activities for students on a
form,
and modify the points field in a form.

I have a form with 2 list boxes on them.
The first list box, lboFirstName,
correctly displays the student's Last Name in the tboLastName text box
field,
using the Row Source property to run a query to pull the first name & last
name from the tblStudents table,
setting the Column Count = 2,
Column Widths = '1";0"',
Bound Column = 1
and using an AfterUpdate function call.

The second list box, lboActivity,
correctly displays the student activities from the tblActivity table,
BUT does not display the default Grade (points) in the tboPoints text box
field.
Here's the code:
Field Name: lboActivity
Control Source: Using Expression Builder = [tblActivity]![Activity
Description]
Row Source Type: Table/Query
Row Source: SELECT tblActivity.[Activity Description],
tblActivity.[Activity
Points] FROM tblActivity ORDER BY tblActivity.[Activity Nbr];
Column Count: 2
Column Widths: '1";0"'
Bound Column: 1

The tboPoints Text Box Field shows "#Name?" in the form view as an error.

Please tell me what I'm doing wrong.
Thank you,
mrzin



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:25 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.