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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |