Hi
Ten years ago I developed a software in Foxpro. Now, I am converting it to windows based using VB6 as front end and MS ACCESS 2007 as backend.
I wrote a query in Foxpro as follows:-
fdint.*, space(30) as membername, 0000000 as fint, sum(int_due) as idue, sum(paidint) as pint, { / / } as ddate, { / / } as rdate from fdint where duedate <= dt1 and type = uchoice and duefalls and member_id = memno group by fd_no order by fd_no into tabl fdidue
In Access 2007, I tried this query as follows:-
SELECT fdinterest.*, Space(35) AS membername, 0 AS fint, Sum(fdinterest.int_due) AS idue, Sum(fdinterest.paidint) AS pint, Space(10) AS ddate, Space(10) AS rdate INTO test IN 'D:\Society\Forms\Data\TempData.accdb'
FROM fdinterest
WHERE (((fdinterest.[duedate])<=#9/30/2018#) AND ((fdinterest.[membernumber])='01500'))
GROUP BY fdinterest.fd_no
ORDER BY fdinterest.fd_no;
Why I execute this query, I got the following error message.
CANNOT GROUP ON FIELDS SELECTED WITH '*'(FDINTEREST).
But, I try the above query with a little change, it gives me the result
SELECT fdinterest.fd_no, Space(35) AS membername, 0 AS fint, Sum(fdinterest.int_due) AS idue, Sum(fdinterest.paidint) AS pint, Space(10) AS ddate, Space(10) AS rdate INTO test IN 'D:\Society\Forms\Data\TempData.accdb'
FROM fdinterest
WHERE (((fdinterest.[duedate])<=#9/30/2018#) AND ((fdinterest.[membernumber])='01500'))
GROUP BY fdinterest.fd_no
ORDER BY fdinterest.fd_no;
(i.e.) I'm taking only one field instead of all fields (*), but I want to all fields in that record.
Please help to me overcome this problem