Update a secondary data source using VB

A

Arthur B.

Hello:
I am trying to update a secondary lookup table MS Access using VB code. I
do not want to submit the entire form yet, but allow the user to populate a
drop down list if an item is not on the list. I am looking for any example
if possible.

Any ideas.

Cheers
AB
 
P

Pranav Wagh[MSFT]

Hello,
Although the question is not very clear to me but if you only want to
update the secondary data source, and read teh values fromthe main data
source, why don't you create the form using secondary data source, and then
add the other data source as a secondary data source.
The other way could be using a web service.

--------------------
Thread-Topic: Update a secondary data source using VB
thread-index: AcX3HqQ9DjkL5bF6TtedX9MI8TXETg==
X-WBNR-Posting-Host: 142.179.175.46
From: =?Utf-8?B?QXJ0aHVyIEIu?= <Arthur (e-mail address removed)>
Subject: Update a secondary data source using VB
Date: Fri, 2 Dec 2005 00:59:02 -0800
Lines: 10
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.infopath
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.infopath:25121
X-Tomcat-NG: microsoft.public.infopath

Hello:
I am trying to update a secondary lookup table MS Access using VB code. I
do not want to submit the entire form yet, but allow the user to populate a
drop down list if an item is not on the list. I am looking for any example
if possible.

Any ideas.

Cheers
AB


Pranav Wagh

"The Real Stuff Is oUT oF tHE bOX"

http://blogs.msdn.com/pranavwagh
http://spaces.msn.com/,e,bers/pranavwagh
http://pranavwagh.blogspot.com
 
A

Arthur B.

Hi Guys,
Thanks for the response, I will be little more clear:
My form has several fields that require updating. One of the requirement is
the drop down list I have created displays the ClientName, which then
populates 2 different fields ClientPhone and Client E-mail. I have this
working fine. I have added an optional section that the user can click on
and display 3 fields to Add a new ClientName, ClientPhone and ClientE-mail
with an OnClick event to update the ClientInfo table in my Access DB. I am
having problems sending the above three fields to my database using VBScrip.

I would like to see the user enter the new ClinetInfo in hte optional
section and then see it in the drop down list where he or she can pick the
new client. The optional section by then will be collapsed and not visible
unless he or she wants to add more ClientInfo .

I hope this helps as to what I am trying to do.
Cheers
 
P

Pranav Wagh[MSFT]

Hi,
I have a simple question, do you need to submit the values back to the main
data source as well, if yes then you should be using webservice for the
update of the secondary datasource.
If no why don't you swap the data sources

Pranav Wagh

"The Real Stuff Is oUT oF tHE bOX"

http://blogs.msdn.com/pranavwagh
http://spaces.msn.com/members/pranavwagh
http://pranavwagh.blogspot.com

--------------------
Thread-Topic: Update a secondary data source using VB
thread-index: AcX3aPc5XxiaStQGTiyarc7nrUE0Wg==
X-WBNR-Posting-Host: 142.179.175.46
From: =?Utf-8?B?QXJ0aHVyIEIu?= <[email protected]>
References: <[email protected]>
<[email protected]>
Subject: RE: Update a secondary data source using VB
Date: Fri, 2 Dec 2005 09:51:04 -0800
Lines: 70
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.infopath
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.infopath:25136
X-Tomcat-NG: microsoft.public.infopath

Hi Guys,
Thanks for the response, I will be little more clear:
My form has several fields that require updating. One of the requirement is
the drop down list I have created displays the ClientName, which then
populates 2 different fields ClientPhone and Client E-mail. I have this
working fine. I have added an optional section that the user can click on
and display 3 fields to Add a new ClientName, ClientPhone and ClientE-mail
with an OnClick event to update the ClientInfo table in my Access DB. I am
having problems sending the above three fields to my database using
VBScrip.

I would like to see the user enter the new ClinetInfo in hte optional
section and then see it in the drop down list where he or she can pick the
new client. The optional section by then will be collapsed and not visible
unless he or she wants to add more ClientInfo .

I hope this helps as to what I am trying to do.
Cheers
 
A

Arthur B.

Hi Pranav,
The answer to your question is yes, once the drop down field (Lookup table)
is populated with the new item, the user can now pick the new item. What I
store on my table is the ID of the ClientInfo ofcourse this happens when the
user finishes updating the rest of the fields on the form and submitting the
entire form.

I was able to update a lookup field if it was based on XML by creating the
resource file but this does not help me because once the user tries to create
a new form the new ClientInfo information is not present anymore.

I am trying not to use any webservices if possible, maybe because I am not
too familiar with it but if you can provide me any sample know how I will
give it a try.

Thanks again for all the help.

Cheers
 
A

Arthur B.

Hi Franck,
Sorry this was not what I was looking for. But I am sure one of these days
I might require it.

Cheers
 
P

Pranav Wagh[MSFT]

Hi,
As i told you previously, webservices is the only way to go !
you can refer following articles for more information regarding web
services, if you need any further info i would sugest that you can open a
case with us, please let me know about the updates.

XML Web Services Basics
http://www.msdn.microsoft.com/library/default.asp?url=/library/en-us/Dnwebsr
v/html/webservbasics.asp

Creating and Accessing XML Web Services Walkthroughs
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html
/vbwlkwalkthroughbuildingusingwebservices.asp


Pranav Wagh

"The Real Stuff Is oUT oF tHE bOX"

http://blogs.msdn.com/pranavwagh
http://spaces.msn.com/members/pranavwagh
http://pranavwagh.blogspot.com

--------------------
Thread-Topic: Update a secondary data source using VB
thread-index: AcX3k22P72scoZx/RwKGX/VryT52TQ==
X-WBNR-Posting-Host: 142.179.175.46
From: =?Utf-8?B?QXJ0aHVyIEIu?= <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Subject: RE: Update a secondary data source using VB
Date: Fri, 2 Dec 2005 14:55:02 -0800
Lines: 136
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.infopath
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.infopath:25156
X-Tomcat-NG: microsoft.public.infopath

Hi Pranav,
The answer to your question is yes, once the drop down field (Lookup table)
is populated with the new item, the user can now pick the new item. What I
store on my table is the ID of the ClientInfo ofcourse this happens when
the
user finishes updating the rest of the fields on the form and submitting
the
entire form.

I was able to update a lookup field if it was based on XML by creating the
resource file but this does not help me because once the user tries to
create
a new form the new ClientInfo information is not present anymore.

I am trying not to use any webservices if possible, maybe because I am not
too familiar with it but if you can provide me any sample know how I will
give it a try.

Thanks again for all the help.

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top