Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Field Label as a Formula

Posted on 2008-11-05
Medium Priority
Last Modified: 2008-11-12

I want to be able to set a field label name through a formula. So far this is what i have

Format(now(),"mm-yyyy": "test"

But apparently the field label still shows up as Format(now(),"mm-yyyy" and not 11-2008: "test"

any suggestions?
Question by:repco
LVL 61

Accepted Solution

mbizup earned 600 total points
ID: 22886861
Try adding this code to the open event of your form (replace myLabelName with the actual label name):

Me.MyLabelname.Caption = Format(now(),"mm-yyyy") &  " test"

Author Comment

ID: 22886886
well i have this in a SQL query and not in a form. sorry i should of mentioned that
LVL 77

Assisted Solution

peter57r earned 150 total points
ID: 22888236
You can't assign values to labels in sql.
You have to use vba code.

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

If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

580 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