Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memo Field on Form

Status
Not open for further replies.

rfhall50

Programmer
May 21, 2010
3
US
How do you put a memo field on a form ?

The form is used to build a DB. Field in DB is setup as Memo, but can't find how to setup a corresponding field on the input form.

Am I missing a design tool bar somewhere ?

Thank You.

Bobby
 
There is not a special field, you can use a plain text box or a rich text box. If in 2007 look at the rich text to do lots of new formatting.
For the first time [in Access 2007], you can format text a text box: bold, italics, bulleted lists, fonts, colors, etc. Use for comments, merge letter reports, ...
Applies to text boxes that are unbound, bound to an expression, or bound to a Memo field that has the Text Format property set to Rich Text (in table design.)
Note: stores HTML (not RTF.)
 
Make sure you have the Form Design tool bar, also make sure that your required field is contained in the SQL for the forms record source.

You should the find the field list button for you to drag and drop the required field

Jimmy
 
Thank y'all for the replies.

Part of the issue may be that my form fields are all unbounded. User inputs all the data, allowing me to do specific checks before committing the data. I then format an SQL INSERT statement.

Thats why I not seeing an way to attach or convert my text box to the DB memo field.

Any other ideas ? Thanks...

Bobby
 
You use a text box as said before. What is the issue? Do you need more than 64K characters?
 
Thanks ....

64K should be sufficient. The problem is saving the text box to the memo field in the db. Am getting conversion errors.
 
OK, that sounds like a completely different problem. Can you provide the code? What is the error?

example
Code:
Private Sub Command4_Click()
  Dim memTemp As String
  Dim strSql As String
  Me.TxtBoxMemo.SetFocus
  
  If Not IsNull(Me.TxtBoxMemo.Text) Then
    memTemp = Me.TxtBoxMemo.Text
    strSql = "Insert into tblData ( newMemo ) values('" & memTemp & "')"
    CurrentDb.Execute strSql
  End If
End Sub
 
You may also want to bind the form to a table. A temporary table that only holds one record. You can set the form to allow additions equal false. Then when you do your insert query delete the record. This will make building a stored query very easy and it would be simply

currentDb.execute "someStoredQuery"
You may have to set the forms dirty property to false prior to running.
 
User inputs all the data, allowing me to do specific checks before committing the data.
Better still, why not simply use a bound form? The belief that unbound forms are necessary in order to do data validation before "committing" data is simply not true!

Any "checks" you need to do before saving the data can be done in the Form_BeforeUpdate event of a bound form!

A big part of the reason to use Access for database development is the speed with which it can be created, using bound forms. Several developers I know, experienced in Visual Basic database development and Access development, estimate that development using unbound forms by experienced developers takes twice as long as it does when using Access and bound forms.

If you insist on using unbound forms, you'd be far better off using a straight VB or C++ front end with a SQL Server or Oracle back end.

You can create an EXE file which gives total protection to your code/design.

You can distribute the db to PCs without a copy of Access being on board.

Your data security is far, far better than anything you can do in Access.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top