A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Data type mismatch when passing String sort field to report



 
 
Thread Tools Display Modes
  #1  
Old January 26th, 2005, 05:40 PM
F-13
external usenet poster
 
Posts: n/a
Default Data type mismatch when passing String sort field to report

I'm attempting to sort a report from one of two options offered from
an option group [frmSort] on a form [frmSumOrders].

I have added the following code to the "on open" event of the report:

Select Case Forms!frmSumOrders!frmSort
Case 1 'Job
Me.GroupLevel(0).ControlSource = "JobNo"
Case 2 'Company
Me.GroupLevel(0).ControlSource = "Companyname"
End Select

JobNo is a Long Integer, while Companyname is text. Sorting by JobNo
works, however sorting by Companyname gives me a "3464 Data type
mismatch" error message. Could anyone shed any light?

Thanks.
  #2  
Old January 27th, 2005, 03:32 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

What other options have you set in the Sorting'n'Grouping box, e.g. for
Group On and Group Interval?

You could try saving the report unbound (i.e. nothing in its RecordSource).
Then in Report_Open:
Me.RecordSource = "SELECT ...
That way it has no idea what data types it should expect.


--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"F-13" wrote in message
om...
I'm attempting to sort a report from one of two options offered from
an option group [frmSort] on a form [frmSumOrders].

I have added the following code to the "on open" event of the report:

Select Case Forms!frmSumOrders!frmSort
Case 1 'Job
Me.GroupLevel(0).ControlSource = "JobNo"
Case 2 'Company
Me.GroupLevel(0).ControlSource = "Companyname"
End Select

JobNo is a Long Integer, while Companyname is text. Sorting by JobNo
works, however sorting by Companyname gives me a "3464 Data type
mismatch" error message. Could anyone shed any light?

Thanks.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Memo data type to Text data type DS New Users 1 January 26th, 2005 04:56 PM
Data type mismatch in criteria expression Paul James Running & Setting Up Queries 5 September 8th, 2004 01:13 AM
Adding staff photographs to my database KK New Users 2 September 3rd, 2004 07:41 AM
Newbie? Do I use Report or Query John Egan New Users 11 June 28th, 2004 08:31 PM
NUMBERING the pages Bob New Users 7 June 14th, 2004 12:20 AM


All times are GMT +1. The time now is 11:50 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.