Vertical Alignment

G

Guest

Would someone show me how to center vertically the text on label please?

I open the NAME’s property box and set the "Text Align" property
to "center", but the name centered horizontally, not vertically.

Thanks
Chi
 
G

Guest

Hi Stephen,

Thanks for the response. Please help.

I have the message " Compile error: sub or Function not define"

My code:


Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
VerticallyCenter Me.BoardTitle

End Sub

Would you show me to fix the problem?

Thank you
Chi
 
S

Stephen Lebans

Did you import the code module from my sample MDB you downloaded into your
own MDB? That code module contains the function your error message is
complaining about.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
G

Guest

Yes! Stephen,

I did copy your code. Please help me to fix the problem. I have no ideas
about coding, so I don't know how to call the function.

thanks
Chi
 
S

Stephen Lebans

Well if you copied my code into your own MDB then you would not be receiving
this error.
Please explain what you did to copy my the code from my sample MDB into your
own MDB.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
G

Guest

Hi Stephen,

I opened your database/Report Customer/Design view/ Detail section
properties/On Format /copy the following code.


Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
' You have to call the function every time
' during the Report's Detail Format event.
VerticallyCenter Me.txtCustomerID2
VerticallyCenter Me.txtCustomerName2
VerticallyCenter Me.txtTestMemo2
End Sub
-------------------------------------

I don't know how to call the function every time. Here is what I have in my
database.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
VerticallyCenter Me.BoardTitle

Then, I have the message " Compile error: sub or Function not define"

Thanks
Chi
 
S

Stephen Lebans

You have to import the standard code module from my sample MDB to your own
MDB. This code module contains the function VerticallyCenter.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
G

Guest

Hi Stephen,
Sorry, again I don't know anything about coding stuff. So would you please
tell me more detail like step by step. I don't know where the standard code is
Thanks
Chi
 
S

Stephen Lebans

Open your own MDB.

Select 'File' from the menu bar, 'Get External Data',
'Import...' and a file selection dialog box will appear. Find and
select the file sample MDB you downloaded and unzipped form my site.Click
the 'Import'
button. A 'Import Objects' dialog box will appear. Click the 'Modules'
tab and click the 'Select All' button. Click 'Ok' button.

That's it.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
G

Guest

Hi Stephen,

I started from beginning.

I imported your "modules" into my database, but nothing is happened. Do I
need to do anything with my report?

Thanks
Chi Huynh
 
G

Guest

Hi Stephen,

Thank you so much. I got it!!!!

Stephen Lebans said:
Open your own MDB.

Select 'File' from the menu bar, 'Get External Data',
'Import...' and a file selection dialog box will appear. Find and
select the file sample MDB you downloaded and unzipped form my site.Click
the 'Import'
button. A 'Import Objects' dialog box will appear. Click the 'Modules'
tab and click the 'Select All' button. Click 'Ok' button.

That's it.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

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