if Empty bound field then change the style of the textbox

M

maXim

well i am using bound fields in my access form. now the problem is this i use
this form as preview mode for reporting. now i want that if any field is
null or empty then the style of the textbox should be changed...
 
E

err

Try this:
Add the following private sub in event "On Current" on your Form
me.textbox.visible = True 'Set textboxvisible before check if data is
present in all fields
If me.fieldName1 is null or If me.fieldname2 is null then me.textbox.visible
= False
This will make your textbox unvisible if any of the two fields are null
 
E

err

Why dont you use a report for reporting instead? Then you can change the the
way the text in textbox looks by checking the data in the fields.
 
M

maXim

The report doesnt open in the form as a subreport. so i have to use the form
as in preview mode as a reporting tool.
basically i wanted to show the report as a subreport in the form so that i
can control the report...like runtime reports on button click (by categories
etc)
any idea???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top