i need help on my report

katabullet

Registered User.
Local time
Yesterday, 23:31
Joined
Jul 1, 2013
Messages
15
hello, i have a situation. i am creating a school database system, ive suddenly stocked in the module function. i created form that register student every year. in my query, i want the user to calculate all registered student in each year. i succeeded in doing that using my parameter in my query date field and a function in my vba module

Module
Function ParmValue() As Date
ParmValue = InputBox("date here")
End Function

Query
creiterial=parmvalue()

now i want that the chosen date should be displayed on my report label call "lblyear". the thing is i just cant call any control in my function. why?, can anyone help me please?
 
Use this syntax in order to call a control value:
= Forms!YourFormName!ControlName
 
i do no get it, do i use it under my mudule?
i have use the syntax but i still get the error vba wrong format
can u be more specific pls?
 
Show me what you are tried in order to correct your syntax.
Or post your DB (Access 2003 or 2007 format) and ZIP it before posting.
 
ok, there is a label on the form which should tell tell u the date of the value u wrote. just like the msbox will display the date. i want the lbldate caption should display that date too. just open the query and see what i want to diplay on my lbl. being display on a msgbox instead. oh! and its access 2010
 
how do u upload a file on here?
do i have to use a webfile hosting service?
 
how do u upload a file on here?
do i have to use a webfile hosting service?
 
ok, there is a label on the form which should tell tell u the date of the value u wrote. just like the msbox will display the date. i want the lbldate caption should display that date too. just open the query and see what i want to diplay on my lbl. being display on a msgbox instead. oh! and its access 2010
I haven't seen (yet) what you have uploaded.
But I can advice you to use a text box instead a label.

A text box will look exactly as a label if:
a) Set the Tab Stop property to No;
b) Set the Locked property to Yes.
Unlike the label, a text box has a Control Source property that can be used in order to "bound" the text box to a control in a form. So write this in the control source of the text box (of course, you must replace my placeholders - blue text - with real names):
= Forms!YourFormName!ControlName
(the form must be opened)
 
can u pls download the software out and fix the error for me?
i am sure u will understand my problem there better
and thanks for the hint
 
how do u upload a file on here?
do i have to use a webfile hosting service?
Switch the editor window to Advanced.
On the menu (first line, near the smiley face) is a button to manage attachments (keep pointer over the control an you will see the controls tip text).
If the file is too large do one or more things:
1) Compact the DB
2) ZIP the DB
3) Remove unnecessary forms from the DB.

To convert in a previous version of Access, go to Office button -> Save As -> bla bla
 
ok, let me put it this way, is there any possible way that a module can carry a routine of controls.? . i mean-
how are modules related to from controls?
modules just recognize functions like msgbox, inputbox.... but does not recognize the me keyword
 
I've already showed you the syntax:

Code:
Public Sub / Function SubOrFunctionName()
Dim X
  X= [B]Forms![COLOR=Blue]YourFormName[/COLOR]![COLOR=Blue]ControlName     [/COLOR][/B]     
End Sub / Function
 
oh, ok tnx allot, with that i hope to work the solution to my problem
thanks again
 

Users who are viewing this thread

Back
Top Bottom