querying an access DB to populate a textbox 
Author Message
 querying an access DB to populate a textbox

Hi,

I am a newbie in this field and I need some help with a relatively simple
task. I unfortunately cannot afford to spend too much time learning the
technique, since I am already overwhelmed with work.

I use a userform to create a word document from a word template. It is quite
simple: when I click a command button, it only inserts text strings in
defined fields according to the status a a few checkboxes.

I would like to add a second command button in this form. Clicking it, the
user would import the content of a single cell from an access database to a
textbox in my word userform. I tried to code it in VBA with some help from
the word.vba.userforms forum, but unfortunately it didn't work, or it was
too complicated for me...

As hundreds of patients are measured on a specific device, the manufacturer
of the machine has designed a software interface for the measuring
technician, and that data is saved on a laptop in an access database format.

What I would like to do is : click a button on my word userform, this would
open a dialog box where I would put the "patient number" as it is in my
access database, pressing OK would launch a query and retrieve the content
the "BMD" cell for that "patient number" into a textbox in my userform, and
it would be ready to be inserted into my word document.

My database has only one table, and all entries have only text strings or
numerical content.

Any idea on how to do this ? I know nothing about SQL !!!
--
----------------------------------------------
Lorenzo Sandini
Kirurgian Klinikka
Kansanterveyden Tutkimuslaitos
Kuopion Yliopisto
70200 Kuopio
SUOMI-FINLAND
------------------------------------------------
http://www.*-*-*.com/
GSM-050.359.28.31



Mon, 22 Sep 2003 17:34:52 GMT  
 querying an access DB to populate a textbox
I've sent you a working example Word-template + Access mdb by mail
/akb


Quote:
> Hi,

> I am a newbie in this field and I need some help with a relatively simple
> task. I unfortunately cannot afford to spend too much time learning the
> technique, since I am already overwhelmed with work.

> I use a userform to create a word document from a word template. It is
quite
> simple: when I click a command button, it only inserts text strings in
> defined fields according to the status a a few checkboxes.

> I would like to add a second command button in this form. Clicking it, the
> user would import the content of a single cell from an access database to
a
> textbox in my word userform. I tried to code it in VBA with some help from
> the word.vba.userforms forum, but unfortunately it didn't work, or it was
> too complicated for me...

> As hundreds of patients are measured on a specific device, the
manufacturer
> of the machine has designed a software interface for the measuring
> technician, and that data is saved on a laptop in an access database
format.

> What I would like to do is : click a button on my word userform, this
would
> open a dialog box where I would put the "patient number" as it is in my
> access database, pressing OK would launch a query and retrieve the content
> the "BMD" cell for that "patient number" into a textbox in my userform,
and
> it would be ready to be inserted into my word document.

> My database has only one table, and all entries have only text strings or
> numerical content.

> Any idea on how to do this ? I know nothing about SQL !!!
> --
> ----------------------------------------------
> Lorenzo Sandini
> Kirurgian Klinikka
> Kansanterveyden Tutkimuslaitos
> Kuopion Yliopisto
> 70200 Kuopio
> SUOMI-FINLAND
> ------------------------------------------------
> http://kotisivu.raketti.net/brokenbone/erik
> GSM-050.359.28.31



Mon, 22 Sep 2003 18:14:09 GMT  
 querying an access DB to populate a textbox
Great great great !!!

Thank you Anna, you spared me days of headaches, whining and complaining ...

:o)
--
----------------------------------------------
Lorenzo Sandini
Kirurgian Klinikka
Kansanterveyden Tutkimuslaitos
Kuopion Yliopisto
70200 Kuopio
SUOMI-FINLAND
------------------------------------------------
http://kotisivu.raketti.net/brokenbone/erik
GSM-050.359.28.31

Quote:
> I've sent you a working example Word-template + Access mdb by mail
> /akb



Mon, 22 Sep 2003 18:32:18 GMT  
 querying an access DB to populate a textbox
For others to benefit from the discussion.

The question has been posted twice and the code is posted in another message
on April 3, "Combo Box on UserForm - from Access." in word.vba.userforms

/Anna



Quote:
> Great great great !!!

> Thank you Anna, you spared me days of headaches, whining and complaining
...

> :o)
> --
> ----------------------------------------------
> Lorenzo Sandini
> Kirurgian Klinikka
> Kansanterveyden Tutkimuslaitos
> Kuopion Yliopisto
> 70200 Kuopio
> SUOMI-FINLAND
> ------------------------------------------------
> http://kotisivu.raketti.net/brokenbone/erik
> GSM-050.359.28.31


> > I've sent you a working example Word-template + Access mdb by mail
> > /akb



Mon, 22 Sep 2003 18:40:47 GMT  
 querying an access DB to populate a textbox
Would you please send it to mee too ??

thanks in advance

Rob



Quote:
> I've sent you a working example Word-template + Access mdb by mail
> /akb



Wed, 24 Sep 2003 01:50:28 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. ADO to Access DB, DB is closed on second query

2. POPULATE ACCESS DB FROM SEQ FILE

3. Please Help - Populating a TreeView from an Access DB

4. Trying to populate an array with Access DB

5. Userform: populate textbox with date from another textbox

6. Populate a treeview control from Mas access database / query

7. populating asp page with access database query ?

8. showing data in textbox pulled from access db

9. Querying an access 2000 db using VB

10. Query Against Access DB over the Web

11. Execute parameterized query stored in ACCESS-2 DB thru VBA

12. Newbie question: "undefined function in query", Access db

 

 
Powered by phpBB® Forum Software