Hi Cronk. Thank you for your advice. Yes you are right I should put in more details.
I have worked out the issue. The problem was that the reports!YourReportName.recordsource was invoked in a function. If I move reports!YourReportName.recordsource to the on load even of the report, it...
Is it possible to retrieve the query name for a report?
I am trying to create a button in a report and when the button is click, it would provide the name of the query that is behind the report (i.e. the query that is record source for the report).
How do I go about in achieving this...
Hi arnelgp
Thank you so much. This does exactly filter what I need. However it is my fault I didn't explain very well what I am trying to do.
We want to have a button on a form which when click would:
- trigger the VBA code to run the query, (with the where condition or filter the...
I have a query set up in Access without any criteria or parameters set.
In VBA, I can use DoCmd.OpenQuery to run it. However it doesn't have the parameter to run it with where condition. Whereas DoCmd.OpenReport you can
Is there any way to run the query in VBA with where condition? Or is...
Hi arnelgp,
Thank you for your suggestion. Unfortunately "=Nz([txtPrimaryWkpt_area], 0) /Nz([txtNLA], 1)"does seem to work.
I ended up using the following
=IIf([txtNLA]=0,0,[txtPrimaryWkpt_area]/[txtNLA])
Is it possible to have a form that would use different SQL statements to load its data depending on which button the user is used to invoke the form? If so, how to achieve this?
I have a form that is used for entering data to the table “Project”. It is also used to display existing data from...
I have a text box and its control source is an expression as follow:
=[txtPrimaryWkpt_area]/[txtNLA]
When the value is Null, it is displaying "#Num!"
I have tried adding Nz around the expression to become
=Nz([txtPrimaryWkpt_area]/[txtNLA], 0)
However it makes no differences...
Thank you arnelgp and MarkK. Both your suggestions works great.
Arnelgp. Thank you for suggesting on using DSum. I had tried it before but didn't work. I now realised I got the proj_id field wrong.
MarkK, you are right. I should avoid updating the parent with calculation on child...
When I ran the following function I got the error message “Operation must use an updateable query.”:
Public Function UpdProjNLA()
NLA_SQL = _
"UPDATE Project " & _
"SET Project.projNLA_area = " & _
"(SELECT Sum(Floor.formalVSml_no * Floor.nla) " & _
"FROM Floor...
Hi Ranman256.
Thank you for responding. Seems like you were going to include some links or codes that might have been left out. Would you be able to provide those information please? Thank you.
I have a button with embedded marco (using macro builder). The macro carries out a series of actions/command. One of actions is to call a vba function.
The intention is for this vba function to return a value back to the macro which will then carry a series of action based on the returned...
Hi CJ_London. Thank you for the all advice. I am inclining to leave the subform as is for now and, if time permits, I will look into making it unbound.
Is there anyway to have a messagebox whenever users click the 2nd tab so to let them know changes made in the other tabs have been saved...