REPOST (No response last post) Text Box issues

J

James

Hello I was assisted in this forum by someone who give me
thr below code:

=DFirst("[ReturnPercentage]","qryPercent")

I get #Error in the text box when I show the form view...

The query at the back of that qryPercent... calculates the
percentage of all the records in the table against the
selections made in 3 combo boxes...

How can I fix this #error thing?

Any Help greatly appreciated...

James
 
F

fredg

Hello I was assisted in this forum by someone who give me
thr below code:

=DFirst("[ReturnPercentage]","qryPercent")

I get #Error in the text box when I show the form view...

The query at the back of that qryPercent... calculates the
percentage of all the records in the table against the
selections made in 3 combo boxes...

How can I fix this #error thing?

Any Help greatly appreciated...

James

In all probability, the name of your control is "ReturnPercentage".
Change the name to something else.

Why are you using DFirst?
DFirst (and DLast) do not offer consistent returned records, as First
and Last are dependent upon the Sort order.
 
D

Damon Heron

Your query should be in ascending order and the top value should be set to
1....

Damon
 
J

James

I am using DFirst because I was told to by someone in
these newsgroups to overcome my problem...

If not using teh DFirst then what would you recommend I do
and use?

Many Thanks

James
-----Original Message-----
Hello I was assisted in this forum by someone who give me
thr below code:

=DFirst("[ReturnPercentage]","qryPercent")

I get #Error in the text box when I show the form view...

The query at the back of that qryPercent... calculates the
percentage of all the records in the table against the
selections made in 3 combo boxes...

How can I fix this #error thing?

Any Help greatly appreciated...

James

In all probability, the name of your control is "ReturnPercentage".
Change the name to something else.

Why are you using DFirst?
DFirst (and DLast) do not offer consistent returned records, as First
and Last are dependent upon the Sort order.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
J

James

When you say the top value should be set to 1 what exactly
do you mean?

Many Thanks

James
-----Original Message-----
Your query should be in ascending order and the top value should be set to
1....

Damon

Hello I was assisted in this forum by someone who give me
thr below code:

=DFirst("[ReturnPercentage]","qryPercent")

I get #Error in the text box when I show the form view...

The query at the back of that qryPercent... calculates the
percentage of all the records in the table against the
selections made in 3 combo boxes...

How can I fix this #error thing?

Any Help greatly appreciated...

James


.
 
F

fredg

I am using DFirst because I was told to by someone in
these newsgroups to overcome my problem...

If not using teh DFirst then what would you recommend I do
and use?

Many Thanks

James
-----Original Message-----
Hello I was assisted in this forum by someone who give me
thr below code:

=DFirst("[ReturnPercentage]","qryPercent")

I get #Error in the text box when I show the form view...

The query at the back of that qryPercent... calculates the
percentage of all the records in the table against the
selections made in 3 combo boxes...

How can I fix this #error thing?

Any Help greatly appreciated...

James

In all probability, the name of your control is "ReturnPercentage".
Change the name to something else.

Why are you using DFirst?
DFirst (and DLast) do not offer consistent returned records, as First
and Last are dependent upon the Sort order.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

I don't know what you should do, since no where in this or the
previous post do you state what it is you are trying to do and why you
should use DFirst.
If you wish to get a record returned by your query, perhaps DMin or
DMax, or perhaps just DLookUp will work, but I have no idea what you
wish to accomplish with DFirst.

From VBA help on DFirst:
Use the DFirst function to return a random record from a particular
field in a table or query, when you need any value from that field.

Look up DFirst and DLast in Access help.
*** Read the Remarks section. ***

Anyway, do you still get the #Error after changing the control's name?
 
D

Damon Heron

Call up your query in design view. Right click on the form, and select
Properties. There you will find Top Values. Set to 1.

Damon

James said:
When you say the top value should be set to 1 what exactly
do you mean?

Many Thanks

James
-----Original Message-----
Your query should be in ascending order and the top value should be set to
1....

Damon

Hello I was assisted in this forum by someone who give me
thr below code:

=DFirst("[ReturnPercentage]","qryPercent")

I get #Error in the text box when I show the form view...

The query at the back of that qryPercent... calculates the
percentage of all the records in the table against the
selections made in 3 combo boxes...

How can I fix this #error thing?

Any Help greatly appreciated...

James


.
 
J

James

Ok I have a query which gives me a percentage which is
based on 3 combo boxes... so when the values are entered
in the combo boxes by the user i want the text box to show
the percentage of the values selected by the number of
records in teh database...

Also what would you suggest as to changing my7 control
name to?

Does this help any?

Many Thanks

james
-----Original Message-----
I am using DFirst because I was told to by someone in
these newsgroups to overcome my problem...

If not using teh DFirst then what would you recommend I do
and use?

Many Thanks

James
-----Original Message-----
On Tue, 27 Apr 2004 05:20:44 -0700, James wrote:

Hello I was assisted in this forum by someone who
give
me
thr below code:

=DFirst("[ReturnPercentage]","qryPercent")

I get #Error in the text box when I show the form view...

The query at the back of that qryPercent...
calculates
the
percentage of all the records in the table against the
selections made in 3 combo boxes...

How can I fix this #error thing?

Any Help greatly appreciated...

James

In all probability, the name of your control is "ReturnPercentage".
Change the name to something else.

Why are you using DFirst?
DFirst (and DLast) do not offer consistent returned records, as First
and Last are dependent upon the Sort order.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

I don't know what you should do, since no where in this or the
previous post do you state what it is you are trying to do and why you
should use DFirst.
If you wish to get a record returned by your query, perhaps DMin or
DMax, or perhaps just DLookUp will work, but I have no idea what you
wish to accomplish with DFirst.

From VBA help on DFirst:
Use the DFirst function to return a random record from a particular
field in a table or query, when you need any value from that field.

Look up DFirst and DLast in Access help.
*** Read the Remarks section. ***

Anyway, do you still get the #Error after changing the control's name?
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
J

James

Ok and when you say shoud be in acending order what should
I be sorting in that order?

Mnay Thanks

James
-----Original Message-----
Call up your query in design view. Right click on the form, and select
Properties. There you will find Top Values. Set to 1.

Damon

When you say the top value should be set to 1 what exactly
do you mean?

Many Thanks

James
-----Original Message-----
Your query should be in ascending order and the top
value
should be set to
1....

Damon

Hello I was assisted in this forum by someone who
give
me
thr below code:

=DFirst("[ReturnPercentage]","qryPercent")

I get #Error in the text box when I show the form view...

The query at the back of that qryPercent...
calculates
the
percentage of all the records in the table against the
selections made in 3 combo boxes...

How can I fix this #error thing?

Any Help greatly appreciated...

James



.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top