form with unbound text box

T

ted medin

We have an unbound form & would like to load the text box on the form with
data, then wait for the operator to make changes on the form. After that we
would like to get the data from the text box & proceed with the vb code.

Here is a skeleton of the vb code.

DoCmd.Openform "test form", acPreview, , , acFormEdit, acWindowNormal

Forms![test form]![MEM#] = 345
DoCmd.Openform "test form", , , , WindowMode:=acDialog ' wait for the
ok

strtemp = forms![test form]![mem#]
DoCmd.Close acForm, "test form", acSaveNo

Tried to do it without the first docmd.openform but no banana. Any ideas?
TIA
 
R

ruralguy via AccessMonster.com

Hi Ted,
Why are you using an unbound form? You are bypassing much of the power of
Access!

ted said:
We have an unbound form & would like to load the text box on the form with
data, then wait for the operator to make changes on the form. After that we
would like to get the data from the text box & proceed with the vb code.

Here is a skeleton of the vb code.

DoCmd.Openform "test form", acPreview, , , acFormEdit, acWindowNormal

Forms![test form]![MEM#] = 345
DoCmd.Openform "test form", , , , WindowMode:=acDialog ' wait for the
ok

strtemp = forms![test form]![mem#]
DoCmd.Close acForm, "test form", acSaveNo

Tried to do it without the first docmd.openform but no banana. Any ideas?
TIA
 
T

ted medin

Have a field with lots of sub fields.
ruralguy via AccessMonster.com said:
Hi Ted,
Why are you using an unbound form? You are bypassing much of the power of
Access!

ted said:
We have an unbound form & would like to load the text box on the form with
data, then wait for the operator to make changes on the form. After that
we
would like to get the data from the text box & proceed with the vb code.

Here is a skeleton of the vb code.

DoCmd.Openform "test form", acPreview, , , acFormEdit, acWindowNormal

Forms![test form]![MEM#] = 345
DoCmd.Openform "test form", , , , WindowMode:=acDialog ' wait for the
ok

strtemp = forms![test form]![mem#]
DoCmd.Close acForm, "test form", acSaveNo

Tried to do it without the first docmd.openform but no banana. Any ideas?
TIA
 
L

Larry Linson

It's a non-relational thing, so not only is ted foregoing the power and
speed of using bound forms, he's also foreoing the power and structure of
proper relational database design principles.

But he, and others, are going to LUV "complex data" in Access 2007.

Larry Linson
Microsoft Access MVP

ruralguy via AccessMonster.com said:
What is a sub field?

ted said:
Have a field with lots of sub fields.
Hi Ted,
Why are you using an unbound form? You are bypassing much of the power
of
[quoted text clipped - 18 lines]
Tried to do it without the first docmd.openform but no banana. Any
ideas?
TIA
 
Top