Dear Experts
PLEA:
Please can I request some help. I have trolled through various posts in this forum and internet and feel lost. I have moderate knowledge of VBA and novice at calling sql server stored procedure from access.
BACKGROUND:
I have Access FE connected to Access BE with about 200 records in table ‘Customer’. Each record have 20 fields of information. I have a form ‘SearchF’ with four unbound fields (UniqueID, Name, Surname, DoB) and a ListBoxA populated by a query to retrieve matching record(s) from access BE. Selecting record in ListBoxA opens form with complete details of a selected customer.
There is a SQL Server with table containing records of thousands of customers each with twenty fields of data (same as access BE table). I have two stored proc on sql server ‘SearchCust’ and ‘SelectCust’. ‘SearchCust’ SP retrieves four fields from all records matching four params on search form and ‘SelectCust’ SP will retrieve one unique record based on UniqueID.
PROBLEM:
I want to do two things which I am struggling with and need help:
1. When ListBoxA does not retrieves any record from BE, I want to call SearchCust SP passing four params from unbound text fields to look for matching customers in sql server and populate ListBoxB on Form ‘sqlCustF’. Then when I select one of these records I want to call ‘SelectCust’ SP retrieving unique record and *INSERT in my Access BE Table as a new record.
2. When ListBoxA retrieves record(s) from BE and when I select one, I want to call SelectCust SP and *UPDATE access BE table with SP retrieved recordset.
I am using Access 2007. I have a working ODBC connection string. Any help / pointer / code or sample will be greatly appreciated.
Many thanks in advance.
PLEA:
Please can I request some help. I have trolled through various posts in this forum and internet and feel lost. I have moderate knowledge of VBA and novice at calling sql server stored procedure from access.
BACKGROUND:
I have Access FE connected to Access BE with about 200 records in table ‘Customer’. Each record have 20 fields of information. I have a form ‘SearchF’ with four unbound fields (UniqueID, Name, Surname, DoB) and a ListBoxA populated by a query to retrieve matching record(s) from access BE. Selecting record in ListBoxA opens form with complete details of a selected customer.
There is a SQL Server with table containing records of thousands of customers each with twenty fields of data (same as access BE table). I have two stored proc on sql server ‘SearchCust’ and ‘SelectCust’. ‘SearchCust’ SP retrieves four fields from all records matching four params on search form and ‘SelectCust’ SP will retrieve one unique record based on UniqueID.
PROBLEM:
I want to do two things which I am struggling with and need help:
1. When ListBoxA does not retrieves any record from BE, I want to call SearchCust SP passing four params from unbound text fields to look for matching customers in sql server and populate ListBoxB on Form ‘sqlCustF’. Then when I select one of these records I want to call ‘SelectCust’ SP retrieving unique record and *INSERT in my Access BE Table as a new record.
2. When ListBoxA retrieves record(s) from BE and when I select one, I want to call SelectCust SP and *UPDATE access BE table with SP retrieved recordset.
I am using Access 2007. I have a working ODBC connection string. Any help / pointer / code or sample will be greatly appreciated.
Many thanks in advance.