Hello!
New to Access and having a time.
Basically I want to be able to add records to a subform based on a non-id combo list. Did some research and it appears that this can be done with an unbound combo- great! But sadly, it's not working.
So, here's the background (probably too much info…)
TABLES AND FIELDS
tblCompany [fields Company_ID and Company_Description]
tblEvents [fields Events_ID, Event_Name, Event_Code]
both of which have a one to many relationship to the associate table
tblEventsCompany [fields EventsCompanyId, EventId, CompanyID]
QUERY
qryECom_Com
relationship:
tblCompany o2m tblEventsCompany, tblEvents o2m tblEventsCompany
fields:
tblCompany.Company_Decscription, tblCompany.Company_ID, tblEvents.Event_Name, tblEvents.EventCode, tblEventsCompany. EventsCompanyID, tblEventsCompany. EventsID, tblEventsCompany. CompanyID
FORM
frmEVENTS this form has a tab control with several tabs, each with a different subreport. Data is enabled on all tabs.
fields:
tblEvents.Event_Name, tblEvents.EventCode, tblEvents.Events_ID
SUBREPORT
subECom_Com link on EventId
record source:
SELECT tblCompany.Company_Description, tblEventsCompany.EventsCompanyID, tblEventsCompany.EventsId, tblEventsCompany.CompanyId
FROM tblCompany INNER JOIN tblEventsCompany ON tblCompany.Company_ID = tblEventsCompany.CompanyId;
Fields: I’ve currently included all fields in the query so that I can see if all is saving correctly. Which it’s not.
tblCompany.Company_Decscription, tblCompany.Company_ID, tblEvents.Event_Name, tblEvents.EventCode, tblEventsCompany. EventsCompanyID, tblEventsCompany. EventsID, tblEventsCompany. CompanyID
I’ve also added an unbound combo field:
Row Source:
SELECT tblCompany.Company_Description, tblCompany.Company_ID
FROM tblCompany
ORDER BY tblCompany.Company_Description;
Column count:
2
So. Here’s my extensive list of problems. I’m sorry.
1) While the combo box works great displaying the info so that the user can select from description w/o creating a new record, it changes that field for every record on every tab.
2) No new record is actually created
3) I don’t really want the user to be able to add a new company description, just choose from a list.
4) None of the other fields populates including the autonumber id.
I suspect that this might have something to do with the Event tab (On Enter, On Exit etc). Like I said, I’m new to Access and don’t know anything much. Beginner. No coding experience.
Any help would be much appreciated.
Thanks!
New to Access and having a time.
Basically I want to be able to add records to a subform based on a non-id combo list. Did some research and it appears that this can be done with an unbound combo- great! But sadly, it's not working.
So, here's the background (probably too much info…)
TABLES AND FIELDS
tblCompany [fields Company_ID and Company_Description]
tblEvents [fields Events_ID, Event_Name, Event_Code]
both of which have a one to many relationship to the associate table
tblEventsCompany [fields EventsCompanyId, EventId, CompanyID]
QUERY
qryECom_Com
relationship:
tblCompany o2m tblEventsCompany, tblEvents o2m tblEventsCompany
fields:
tblCompany.Company_Decscription, tblCompany.Company_ID, tblEvents.Event_Name, tblEvents.EventCode, tblEventsCompany. EventsCompanyID, tblEventsCompany. EventsID, tblEventsCompany. CompanyID
FORM
frmEVENTS this form has a tab control with several tabs, each with a different subreport. Data is enabled on all tabs.
fields:
tblEvents.Event_Name, tblEvents.EventCode, tblEvents.Events_ID
SUBREPORT
subECom_Com link on EventId
record source:
SELECT tblCompany.Company_Description, tblEventsCompany.EventsCompanyID, tblEventsCompany.EventsId, tblEventsCompany.CompanyId
FROM tblCompany INNER JOIN tblEventsCompany ON tblCompany.Company_ID = tblEventsCompany.CompanyId;
Fields: I’ve currently included all fields in the query so that I can see if all is saving correctly. Which it’s not.
tblCompany.Company_Decscription, tblCompany.Company_ID, tblEvents.Event_Name, tblEvents.EventCode, tblEventsCompany. EventsCompanyID, tblEventsCompany. EventsID, tblEventsCompany. CompanyID
I’ve also added an unbound combo field:
Row Source:
SELECT tblCompany.Company_Description, tblCompany.Company_ID
FROM tblCompany
ORDER BY tblCompany.Company_Description;
Column count:
2
So. Here’s my extensive list of problems. I’m sorry.
1) While the combo box works great displaying the info so that the user can select from description w/o creating a new record, it changes that field for every record on every tab.
2) No new record is actually created
3) I don’t really want the user to be able to add a new company description, just choose from a list.
4) None of the other fields populates including the autonumber id.
I suspect that this might have something to do with the Event tab (On Enter, On Exit etc). Like I said, I’m new to Access and don’t know anything much. Beginner. No coding experience.
Any help would be much appreciated.
Thanks!