Field Sizes

G

Guest

Could anyone tell me if it possible to increase the size of a text field
above that of the 255 character maximum, or limit the number of characters in
a memo field.

I have a form with a memo field but in some of the records this exceeds the
space I have on the corresponding report. I would like to set the form up so
that the number of characters allowed can be limited. I need to have a
maximim of 690 characters.
 
G

Guest

You can limit the input of the text in the form using the OnKeyPress property
of the text box of this memo field

If Len(Me.[TextBoxName].Text) > 690 Then
MsgBox "Text cant exceed 690 chr"
KeyAscii = 0
End If
 
G

Guest

Many thanks Ofer, I'll try that.

Rob

Ofer Cohen said:
You can limit the input of the text in the form using the OnKeyPress property
of the text box of this memo field

If Len(Me.[TextBoxName].Text) > 690 Then
MsgBox "Text cant exceed 690 chr"
KeyAscii = 0
End If

--
Good Luck
BS"D


Rob2001 said:
Could anyone tell me if it possible to increase the size of a text field
above that of the 255 character maximum, or limit the number of characters in
a memo field.

I have a form with a memo field but in some of the records this exceeds the
space I have on the corresponding report. I would like to set the form up so
that the number of characters allowed can be limited. I need to have a
maximim of 690 characters.
 
G

Guest

Hello again Ofer

I tried your suggestion but it returns a Compile Error: 'Method or data
member not found'. It doesn't recognise the '.Text' part of the code.

Rob

Ofer Cohen said:
You can limit the input of the text in the form using the OnKeyPress property
of the text box of this memo field

If Len(Me.[TextBoxName].Text) > 690 Then
MsgBox "Text cant exceed 690 chr"
KeyAscii = 0
End If

--
Good Luck
BS"D


Rob2001 said:
Could anyone tell me if it possible to increase the size of a text field
above that of the 255 character maximum, or limit the number of characters in
a memo field.

I have a form with a memo field but in some of the records this exceeds the
space I have on the corresponding report. I would like to set the form up so
that the number of characters allowed can be limited. I need to have a
maximim of 690 characters.
 
G

Guest

Can you post the full code include the Sub name

Private Sub MemoField_KeyPress(KeyAscii As Integer)
If Len(Me.[MemoField].Text) > 690 Then
MsgBox "Text cant exceed 690 chr"
KeyAscii = 0
End If

End Sub
--
Good Luck
BS"D


Rob2001 said:
Hello again Ofer

I tried your suggestion but it returns a Compile Error: 'Method or data
member not found'. It doesn't recognise the '.Text' part of the code.

Rob

Ofer Cohen said:
You can limit the input of the text in the form using the OnKeyPress property
of the text box of this memo field

If Len(Me.[TextBoxName].Text) > 690 Then
MsgBox "Text cant exceed 690 chr"
KeyAscii = 0
End If

--
Good Luck
BS"D


Rob2001 said:
Could anyone tell me if it possible to increase the size of a text field
above that of the 255 character maximum, or limit the number of characters in
a memo field.

I have a form with a memo field but in some of the records this exceeds the
space I have on the corresponding report. I would like to set the form up so
that the number of characters allowed can be limited. I need to have a
maximim of 690 characters.
 
G

Guest

Dear Ofer
Your code is now working perfectly. The problem was with the input form. I
had made a copy of an identical form but it also saved several naming
conventions of the original form, therefore the code was correct but could
not find the target fields.

I can't thank you enough, you're a star!

Rob

Ofer Cohen said:
Can you post the full code include the Sub name

Private Sub MemoField_KeyPress(KeyAscii As Integer)
If Len(Me.[MemoField].Text) > 690 Then
MsgBox "Text cant exceed 690 chr"
KeyAscii = 0
End If

End Sub
--
Good Luck
BS"D


Rob2001 said:
Hello again Ofer

I tried your suggestion but it returns a Compile Error: 'Method or data
member not found'. It doesn't recognise the '.Text' part of the code.

Rob

Ofer Cohen said:
You can limit the input of the text in the form using the OnKeyPress property
of the text box of this memo field

If Len(Me.[TextBoxName].Text) > 690 Then
MsgBox "Text cant exceed 690 chr"
KeyAscii = 0
End If

--
Good Luck
BS"D


:

Could anyone tell me if it possible to increase the size of a text field
above that of the 255 character maximum, or limit the number of characters in
a memo field.

I have a form with a memo field but in some of the records this exceeds the
space I have on the corresponding report. I would like to set the form up so
that the number of characters allowed can be limited. I need to have a
maximim of 690 characters.
 

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