Advertisement

02.29.2008 at 03:34AM PST, ID: 23203389
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

unbound form issue with memo field and unbound subform
Tags: Microsoft, Access, 2003, unbound form issue
I have 2 issues both relating to an unbound form.  The project is in Access 2003.

I have a product table that requires multiple serial numbers as well as a note field.  The note field in the table is a memo field.  The multiple serial numbers are in a separate table linked on product id.

How can I accept more that 255 characters in the note field unbound text box?  How can I make this text box look like a memo field?

How can I have a continuous sub-form for the serial number table linked back to the unbound product id?

Thank you for you help with this.  
Start your free trial to view this solution
Question Stats
Zone: Microsoft
Question Asked By: comres
Solution Provided By: harfang
Participating Experts: 2
Solution Grade: A
Views: 152
Translate:
Loading Advertisement...
02.29.2008 at 04:14AM PST, ID: 21012547

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.29.2008 at 04:30AM PST, ID: 21012614

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.29.2008 at 04:55AM PST, ID: 21012725

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.29.2008 at 05:10AM PST, ID: 21012823

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.29.2008 at 05:23AM PST, ID: 21012909

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.29.2008 at 05:39AM PST, ID: 21013023

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.29.2008 at 05:53AM PST, ID: 21013126

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.29.2008 at 06:05AM PST, ID: 21013224

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.29.2008 at 06:34AM PST, ID: 21013485

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
02.29.2008 at 04:14AM PST, ID: 21012547

Rank: Sage

I'm not sure what you mean by "accept more than 255 characters in the note field unbound textbox" ... your textbox should accept far more than 255 characters. Do you mean you can't save more than 255 characters from that textbox? This could be due to several things - how are you saving the data from that unbound textbox?

Regarding your subform: Build a form that shows the data you want, then embed it as a subform on your mainform ... now just set the Recordsource of that subform whenever your mainform changes to a different record:

Me.NameOfSubformCONTROL.Form.Recordsource = "SELECT * FROM MySerialNumberTable WHERE ProductID=" & Me.ProductID

Note the NameOfSubformCONTROL ... this is the name of the CONTROL on your mainform that shows the subform, and may or may not be named the same as your subform.
 
02.29.2008 at 04:30AM PST, ID: 21012614

Rank: Wizard

1) How can I make this text box look like a memo field?

An unbound text box is basically a "memo field". As LSMC said, it can accept much more than 255 characters, in fact about 64'000 characters. As for the look, you can do three things:

* make the box higher than one line
* set "scroll bars" to "vertical
* set "enter key behaviour" to "new line in field"

2) Subform for unbound field

You can create the subform in the normal fashion. The wizard will not link it to the main form, but you can do it manually. Let's say your main form has a control txtProductID and your subform's source has a field ProductID, you can use these settings:

    LinkChildFields: ProductID
    LinkMasterFields: txtProductID

In other words, "link master field(s)" does not only accept fields, but also controls, despite the name.

I hope that helps
(°v°)
 
02.29.2008 at 04:55AM PST, ID: 21012725
Regarding the Text Box - It does accept as many characters as I type in but when it saves it to the memo field, it truncates after 255 characters.

LSMConsulting - I tried your subform suggestion and received message that the record source specified on this form or report does not exist.  I am sure I am using the wrong control name.  Here is the Record source line that I have for the subform.  

Me.sfrmAssetSerialNo.Form.Recordsource = "SELECT * from tblAssetSerialNumber WHERE tblSerNoAssetID=" & Me.tblAssetID
 
02.29.2008 at 05:10AM PST, ID: 21012823

Rank: Wizard

> when it saves it to the memo field, it truncates after 255 characters.

Ah, then we need to look at the method you are using to save that field. Indeed, several things can truncate text to 255 characters.

(°v°)
 
02.29.2008 at 05:23AM PST, ID: 21012909
The following is the code for the Command Save button - txtAssetNote is the textbox and tblAssetNote is defined as a memo field.

Private Sub cmdSave_Click()

    '--- only process Save if there is data in company name
    If IsNull(txtAssetName) Then
        MsgBox "need a Asset name"
        txtAssetMfg.SetFocus
        Exit Sub
    End If
   
    Dim rst As Recordset
    '--- use the primary key (which is always an autonumber field) to find the record
    '--- if it is a new record, this will find no records, as txtAssetID will be 0
    Set rst = CurrentDb.OpenRecordset("select * from tblAsset where tblAssetID=" & txtAssetID)
    If chkNew = True Then   '--- do we add a new record and save an existing one
        rst.AddNew
    Else
        rst.Edit
    End If
    '--- transfer data from text boxes to table fields
    rst!tblAssetName = txtAssetName
    rst!tblAssetMfg = txtAssetMfg
    rst!tblAssetPurchDate = txtAssetPurchDate
    rst!tblAssetSoftwareType = txtAssetSoftwareType
    rst!tblAssetAnnualCost = txtAssetAnnualCost
    rst!tblAssetDueDate = txtAssetDueDate
    rst!tblAssetSerialNo = txtAssetSerialNo
    rst!tblAssetVendor = txtAssetVendor
    rst!tblAssetNote = txtAssetNote
    rst!tblAssetConcurrentUsers = txtAssetConcurrentUsers
    rst.Update  '--- save the record
    rst.Close   '--- close the recordset
    Set rst = Nothing   '--- reclaim the memory the recordset was using
    chkNew = False  '--- reset the new flag
    '--- enable the list box and the Add New button and the Close button
    '--- must be done before moving focus to the list box
    lstAsset.Enabled = True
    cmdAddNew.Enabled = True
    cmdExit.Enabled = True
    '--- make sure the newest data is in the list box
    lstAsset.Requery
    '--- set the focus to the list box
    lstAsset.SetFocus
    lstAsset = lstAsset.ItemData(0)
    Call lstAsset_AfterUpdate
    '--- disable the text boxes and the Save button, and make Edit button enabled
    txtAssetName.Enabled = False
    txtAssetMfg.Enabled = False
    txtAssetPurchDate.Enabled = False
    txtAssetSoftwareType.Enabled = False
    txtAssetAnnualCost.Enabled = False
    txtAssetDueDate.Enabled = False
    txtAssetSerialNo.Enabled = False
    txtAssetVendor.Enabled = False
    txtAssetNote.Enabled = False
    txtAssetConcurrentUsers.Enabled = False
    cmdSave.Enabled = False
    cmdEdit.Enabled = True
    cmdDel.Enabled = True
   
End Sub
 
02.29.2008 at 05:39AM PST, ID: 21013023

Rank: Wizard

This is exactly what I was going to suggest. As a matter of fact, I just tested it again, and was able to save 10'000 characters from a text box to a memo field: using a DAO recordset, .AddNew, etc. just like you did.

Make sure both the Format and the Input Mask properties of txtAssetNote are blank. Past that, I have no idea what is going wrong. What's more, if your field wasn't a memo field, you'd get the message "field too small to accept the amount of data...", so I won't make you check again...

Sorry I can't be of more help
(°v°)
 
02.29.2008 at 05:53AM PST, ID: 21013126

Rank: Sage

Are you sure your Subform CONTROL is named "sfrmAssetSerialNo" ... you're looking for the name of the Subform control on the mainform, NOT necessarily the name of the form being used as a subform

Run your code again, with the addition of this Msgbox below, and see what this msgbox returns:

rst!tblAssetDueDate = txtAssetDueDate
rst!tblAssetSerialNo = txtAssetSerialNo
rst!tblAssetVendor = txtAssetVendor
Msgbox "Length: "& Len(txtAssetNote)
rst!tblAssetNote = txtAssetNote
 
02.29.2008 at 06:05AM PST, ID: 21013224
The problem with the truncation seems to be happening during the list box selection of the data.  

Private Sub lstAsset_AfterUpdate()

    '--- whenever a new item is chosen in the list box, display the data in text boxes
    txtAssetName = lstAsset.Column(1)
    txtAssetMfg = lstAsset.Column(2)
    txtAssetPurchDate = lstAsset.Column(3)
    txtAssetSoftwareType = lstAsset.Column(4)
    txtAssetAnnualCost = lstAsset.Column(5)
    txtAssetDueDate = lstAsset.Column(6)
  ' txtAssetSerialNo = lstAsset.Column(7)
    txtAssetVendor = lstAsset.Column(8)
    MsgBox (lstAsset.Column(9))
    txtAssetNote = lstAsset.Column(9)
    MsgBox (txtAssetNote)
    txtAssetConcurrentUsers = lstAsset.Column(10)
    txtAssetID = lstAsset.Column(0)   '--- primary key is in the first column (always)
   
End Sub

After the initial edit of the note field, data exceeding 255 characters is placed in the table (the data in the table
is correct).  If I try to edit that same data record again, the above code is executed and only the first 255 characters are placed in the text box.
 
02.29.2008 at 06:34AM PST, ID: 21013485

Rank: Wizard

Ah, yes. A list box cannot return more than 255 characters (for obvious efficiency reasons: why would a list box ever need to display a memo field?).

You will need to populate your fields with another method, similar to the one you use to save the data: a DAO recordset and copying from the fields to the controls.

(°v°)
Accepted Solution
 
 
20080236-EE-VQP-29 / EE_QW_2_20070628