Controlling text fields in access 2002

G

Gasket

I'm having some problems making my data input form nicely usable. First of
all I'd like the text field to grow bigger when written on it, instead of
scrolling as it does now. Is it possible to make the active field grow on top
the others and then go back to it's defined size when another field is
activated? I have a lot of fields in my form and I can't enlarge them
anymore. And the fields might contain a lot of text or none at all.

Another thing is that when printed, the totally empty fields could be left
out completely. Now all I can do is minimize them and print the title and an
empty box with the height of one line. I would only like print the fields and
titles that actually contain information.

One more thing is organizing my reports. Now I have a counter giving each
report a number and organizing those based on that number. The problem is
that people make empty reports, or fill in a previous empty report somewhere
in between newer and older reports. This screws up my filing because the
latest reports might have an old index. I have an idea to make a manditory
"date"-field so that one couldn't exit the report without filling in the
date. Then I could organize the reports by date. I'm not good with VB, so how
can I make the exit-button to check if the date has been entered?

I'd be very grateful for any help you could provide.
 
D

Douglas J. Steele

While the cursor is in a text box, hitting the key combination Shift-F2 will
cause a Zoom box to pop up.
 
G

Gasket

I think I might have solved the third problem, at least partially. I can make
the date needed by modifying the options of the data type from the structure
table. Only problem is that I can't change the option, because not all old
reports have dates. I guess I have to manually either delete the dateless
reports or add dates to them, before I can make the date compulsory and start
sorting the reports by date.

I still have no idea how to solve the first two problems, or will my sorting
idea even work.
 
P

Peter Hibbs

You could easily just change the Height parameter of the Text box
control when it gets the focus and then change it back when it loses
the focus. Something like this :-


Dim vHeight As Long

Private Sub YourTextBox_GotFocus()
vHeight = Me.YourTextBox.Height
Me.YourTextBox.Height = 1500
End Sub

Private Sub YourTextBox_LostFocus()
Me.YourTextBox.Height = vHeight
End Sub


where YourTextBox is the name of your text box control. Change the
figure 1500 (Twips) to the value you need for your box when it has the
focus. If you know the height of the Text box control then you could
just use that figure in place of the vHeight variable which would not
then be needed.

Peter Hibbs.
 

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