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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Run-Time 3001

Status
Not open for further replies.

Alabaster2100

IS-IT--Management
Apr 7, 2001
26
CA
I have an unbound form that looks up a record in my table and populates the controls on the form with the data. The users updates the fields and then runs the query to save the updates back to the table. One field is a memo field that the users are to include detailed descriptions of the work they did. The problem is there seems to be a limit to the amount of data they can put in this control, even though the field is "Memo" the following is the SQL of my Query that writes the data back to the table,

UPDATE tbl_Ticket SET tbl_Ticket.TechID = [Forms]![frm_TicketClose]![cmb_SelectTech], tbl_Ticket.TicketClose = [Forms]![frm_TicketClose]![txt_CloseDate], tbl_Ticket.ResolveID = [Forms]![frm_TicketClose]![cmb_ResolveType], tbl_Ticket.ResolveDetail = [Forms]![frm_TicketClose]![txt_ResolveDetail], tbl_Ticket.[Close] = [Forms]![frm_TicketClose]![chk_CloseTicket]
WHERE (((tbl_Ticket.TicketID)=[Forms]![frm_TicketClose]![cmb_SelectTicket]));

It is called from the following VB "Onclick Event"

Private Sub Command119_Click()
' prompt for confirmation
Dim Msg, Style, Title, Response
Msg = "Save and Close Ticket Now?" ' Define message.
Style = vbYesNo + vbQuestion + vbDefaultButton1 ' Define buttons.
Title = "SAVE TICKET?" ' Define title.

' Display message.
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
' Save all values on form

Dim db As Database

Set db = CurrentDb

DoCmd.SetWarnings (False)
DoCmd.OpenQuery ("qry_TicketCloseAction")
DoCmd.SetWarnings (True)

' reset all values on form
....

I have been able to reproduce this error with both the full version of A2K and the runtime. I have checked all the data types and made sure that they match.
If I make a short comment everything works.
I previously had a strSQL but found that VB limited me to 255 char on the string, so I opted to use a query and use a DoCMD, is this still limited by the 255 char???

Someone please help me... I need to make sure the techs are giving details on their reports.

TIA
HelpDesk@RWDI
 
You can do DoCMD.OpenQuery "queryname" John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top