record souce not allowing edits

shutzy

Registered User.
Local time
Today, 18:11
Joined
Sep 14, 2011
Messages
775
i have a form that has a record source

Code:
SELECT tblClientDetails.FirstName, tblClientDetails.Surname, tblClientDetails.MobileTelephoneNumber, tblClientDetails.SentTextMarketing
FROM (tblCategories INNER JOIN tblItems ON tblCategories.CategoriesID = tblItems.CategoriesID) INNER JOIN ((tblClientDetails INNER JOIN tblOrders ON tblClientDetails.ClientDetailsID = tblOrders.ClientDetailsID) INNER JOIN tblOrdersItems ON tblOrders.OrderID = tblOrdersItems.OrderID) ON tblItems.ItemsID = tblOrdersItems.ItemsID
GROUP BY tblClientDetails.FirstName, tblClientDetails.Surname, tblClientDetails.MobileTelephoneNumber, tblClientDetails.SentTextMarketing
HAVING (((tblClientDetails.MobileTelephoneNumber) Is Not Null) AND ((First(tblCategories.CategoriesID))=[Forms]![frmTextMarketing]![lstTreatment-RetailSelection]));

this does not allow edits on a continous form. the edit i am trying to do is the check box. it will allow edits if the grouping is not on but if it is not on then i will get many duplicates of client details.

so how do i set it up to allow edits but still only get one instance of each client detail.

thank you
 
i thought it was because of the grouping. how do it get it to show only one record for each client then?
 
would a way of doing this be by creating a temp table and having sql append records then get the data from that and then at least i will be able to edit it. or is there a better way.
 
I am unsure.. First, why do you have duplicates in the same table? Having a Temp table might sound like a good plan now, but might leave you confused at some stage.. I think we need to address the issue of duplicates occurring in the same table..
 
the duplicates arise from the tables i need to get the info from. i want the client firstname surname and mobile number. this is deduced from the criteria of what categorie of treatments they have had in the past. which means i have to insert my tables that hold the appointments and the table that holds the items to get the categorie.

each client has had many treatments from different categories. so it is mearly listing the appointments and inserting the client details. thats why i wanted to group it to only get one client name per client
 
So would a MainForm/Subform not solve the issue?

Is it possible if you could show some sample data and/or upload a stripped version of your DB file?
 
in the main form i have two list boxes. one for item type. ie retail, treatments. the second lst box has criteria from the first so it will only show the categories within treatments or retail. then the subform below requeries and displays the client details that have had such treatments that have been selected in the 2nd lst box. i have manged to do it via a tmp tbl.

so i do already have a subform.
 

Users who are viewing this thread

Back
Top Bottom