Default value memo box entry

B

bilbo+

Hi I have a memo box that I want to put in an address as the default value
each time, However whenever i have been able to at the end of each line it
has put in little cubes after each line, how can i get it to just put in the
address as a default including the new lines etc so it isnt just one long
line of text, thanks , WK
 
D

Damian S

Hi bilbo+,

You don't say how you are trying to achieve the default value... never mind.

You could try having some on open event (or on current, or before insert
depending on how you are using your form) that populates your memo field for
you like this:

me.MEMOFIELDNAME = "address line 1" & vbcrlf & "address line 2"

vbcrlf is the VBA constant for a carriage return and line feed.

Hope this helps.

Damian.
 
B

bilbo+

well what i wanted was like a default value of a specific address, (our
company address) which is used most times, but still leave the ability to
delete and enter a different address, the information is still entered into
the table behind the form which is where it's control source points to...
 
D

Damian S

No worries... same method will work, either pick up the data from fields or
from literal text...

Damian.
 
B

bilbo+

Hi, Ive tried using that code but it doesnt seem to work, i do it by right
lcicking on the form properties... goign to code buidlder and using this...

Private Sub Form_Open(Cancel As Integer)

Me.DeliveryAddress = "address line 1" & vbCrLf & "address line 2"

End Sub

However it doesnt seem to work.. am i doign somethign horribly wrong?

ALSO, changing the subject completely, i have a drop down box that the user
clicks to select their name? However i have given everyone user logins so how
can i get the form to automatically select their username from the drop down
and lock it to that job when it is created... so it doesnt matter who opens
that job at a later date, it will always have the user that created it.
Thanks again! wk
 

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