[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

RTE-2427  'You entered an expression that has no value'

Posted on 2006-03-30
8
Medium Priority
?
1,155 Views
Last Modified: 2010-10-05
I'm all of a sudden getting this error "YOU ENTERED AN EXPRESSION THAT HAS NO VALUE" on the below asterisked line.  Strange thing is that when I Debug, the DailyID has a value, a is empty.  If I F8 through the code it works.  What is stopping it?  

Private Sub TemJobNumb_BeforeUpdate(Cancel As Integer)

If IsNull(Me.TemJobNumb) Then
    Me.DailyRptHeadF.Enabled = False
Else
    Me.DailyRptHeadF.Enabled = True
End If
Dim a As Variant

If Not IsNull(Me.DailyRptHeadF!DailyID) Then
  *  a = Me.DailyRptHeadF!DailyID    *Error occurs here.  
    Me.DailyRptHeadF.Form.[DailyRptTimeCardF].Form.RecordSource = "select * from TimeCardDailyRQ() TimeCardDailyRQ where (DailyID = " & a & ")"
End If
End Sub
0
Comment
Question by:SCS1ST
8 Comments
 
LVL 34

Expert Comment

by:flavo
ID: 16331884
Hi SCS1ST,
Forms: Refer to Form and Subform properties and controls:
http://www.mvps.org/access/forms/frm0031.htm

Is DailyRptHeadF the name of the form object or the subform CONTROL name, it needs to be the later

Dave :-)
0
 

Author Comment

by:SCS1ST
ID: 16331893
DailyRptHeadF is the subform on a form called DailyF.  The dailyid is on the subform.  The tempjobnum field on the dailyF form calls this code.
0
 
LVL 54

Expert Comment

by:nico5038
ID: 16331982
Try:
 a = Me.DailyRptHeadF.form!DailyID    

as the link of Dave will tell you.

Nic;o)
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:SCS1ST
ID: 16332245
That didn't work.  Same error, same response.  I can see that DailyF!DailyID has a value, but a doesn't pick it up until I F8.  
0
 
LVL 20

Expert Comment

by:clarkscott
ID: 16332267
Guessing....
How about  Me.DailyRptHeadF.form!DailyID.value
Scott C.
0
 
LVL 34

Accepted Solution

by:
flavo earned 1000 total points
ID: 16332301
*maybe* is needs a refresh or soemthing..

Dim a As Variant

Me.DailyRptHeadF.Form.Requery
Doevents
'// rest of your code

Dave
0
 

Author Comment

by:SCS1ST
ID: 16332302
That doesn't work either.  It doesn't even give me the value of the DailyID.  Where at least I got that before.
0
 

Author Comment

by:SCS1ST
ID: 16332360
Dave, that did it.  However it takes a while to come up after the requery.  I was wondering if maybe the second part of the above code shouldn't be moved to AFTER UPDATE.  I'm going to give it a try.  Thanks so much for your help.  
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question