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 » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Can a text box call a variable in 2003?



 
 
Thread Tools Display Modes
  #1  
Old July 19th, 2004, 11:35 PM
Mike
external usenet poster
 
Posts: n/a
Default Can a text box call a variable in 2003?

In access 2000,2002 I had a report text box that could
reference a public variable in the report module. Access
2003 doesn't seem to like it, returning a #name?
  #2  
Old July 20th, 2004, 04:00 AM
Larry Linson
external usenet poster
 
Posts: n/a
Default Can a text box call a variable in 2003?


"Mike" wrote in message
...
In access 2000,2002 I had a report text box that could
reference a public variable in the report module. Access
2003 doesn't seem to like it, returning a #name?


"Report text box that could reference a public variable"? How? That isn't
supported in any version of Access, AFAIK. The workaround has been to create
a user defined function that accessed the variable and returned it (or a
result using it).

Larry Linson
Microsoft Access MVP


  #3  
Old July 20th, 2004, 03:57 PM
external usenet poster
 
Posts: n/a
Default Can a text box call a variable in 2003?

I guess I'll switch to function calls for 2003

This is how I got it to work in Access 2000,2002



Option Compare Database
Public timestamp As String
Public Final As String
Public StartPage As Integer



Private Sub Report_Open(Cancel As Integer)

timestamp = Now()

response = MsgBox("Final run for book", vbYesNo)
If response = vbYes Then
StartPage = InputBox("Starting page number")
Final = "Y"
Else
StartPage = 1
Final = "N"
End If

End Sub

and this is what I had in the text boxes:


=[Page]+[StartPage]-1

=IIf([Final]="N",[timestamp],"")
 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plain Text with Line Breaks-Word 2003 Joy General Discussion 4 July 20th, 2004 03:43 PM
Office 2003 / Office XP Shortcut Bar Marc Bressman General Discussions 6 June 26th, 2004 08:42 AM
missing textbox in word 2003 versus word 2000 Chris Page Layout 3 May 10th, 2004 02:30 PM


All times are GMT +1. The time now is 03:11 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.