stickiness in Access queries

T

The Doctor

All right, I did write this in the form,
however the line below is showing.

What must I do to make certain that it is only saved.
 
A

Access Developer

Doc, I fear some parts of your post, critical to our understanding of it,
were lost somewhere along the way... What's below is all that was posted,
and it was the only message in the thread, as read by my newsreader (Outlook
Express).

--
Larry Linson
Microsoft Office Access MVP
Co-Author, Microsoft Access Small Business Solutions, Wiley 2010

The Doctor said:
All right, I did write this in the form,
however the line below is showing.

What must I do to make certain that it is only saved.
--
Member - Liberal International This is (e-mail address removed) Ici (e-mail address removed)
God,Queen and country!Never Satan President Republic!Beware AntiChrist rising!
http://www.fullyfollow.me/rootnl2k
USA petition to dissolve the Republic and vote to disoolve it in November
2012
 
J

John W. Vinson

All right, I did write this in the form,
however the line below is showing.

What must I do to make certain that it is only saved.

Please explain the context. "The line below"??? "it" is only saved?

Step back a bit, and bear in mind that we're volunteers, who can only work
with what you actually POST, not what you're thinking or what you see. I'm
guessing you're referring to my reply some time back about setting the Default
Value of a control to the value entered, but other than that I have no idea
what you're expecting, what you're seeing, or what you want.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
T

The Doctor

Please explain the context. "The line below"??? "it" is only saved?

Step back a bit, and bear in mind that we're volunteers, who can only work
with what you actually POST, not what you're thinking or what you see. I'm
guessing you're referring to my reply some time back about setting the Default
Value of a control to the value entered, but other than that I have no idea
what you're expecting, what you're seeing, or what you want.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com

John from https://groups.google.com/forum/?hl=en&fromgroups=#!topic/microsoft.public.access/rLfy6gBP5X

REpeat memory
2 posts by 2 authors in microsoft.public.access
[Email updates to me] [Collapse all]
me (The Doctor change)
Post reply
More message actions
Sep 24 (6 days ago)
Quesion how do you tell an access application to remember a field?
--
Member - Liberal International This is (e-mail address removed) Ici (e-mail address removed)
God,Queen and country!Never Satan President Republic!Beware AntiChrist rising!
http://www.fullyfollow.me/rootnl2k
USA petition to dissolve the Republic and vote to disoolve it in November 2012
John W. Vinson
Post reply
More message actions
Sep 24 (6 days ago)
Quesion how do you tell an access application to remember a field?

If you mean to have a Textbox or other control on a Form become "sticky",
keeping the value most recently entered as the default, you can use a little
VBA code in the AfterUpdate event of the control. Let's say you have a form
with a textbox named MyText. The code would be

Private Sub MyText_AfterUpdate()
Me!MyText.DefaultValue = """" & Me!MyText & """"
End Sub

That's four doublequotes before and after; the Default Value property of a
control (whatever the datatype of the underlying field) must be a text string,
and the quotes do this.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com



So I did as you told me, however what happens is

Once I type in the selected field it then repeat on the line
below.

All that is needed is the once type, the field or in this case fields
are memorised for future use.
 
A

Access Developer

What the heck do you *mean* by "how do you tell an access application to
remember a field"? John gave you an answer to one way the question could be
understood, and your post did not explain anything additional.

BTW, you can't assume that everyone will have the message in a continuous
thread - you need to quote enough to establish context.

We try to help, but this isn't "microsoft.public.access.psychics" so you
need to provide us enough detailed information so we can understand what you
have, what you expected, and what actually happened... without that, it's
not just difficult but impossible to assist you.

--
Larry Linson
Microsoft Office Access MVP
Co-Author, Microsoft Access Small Business Solutions, Wiley 2010


The Doctor said:
Please explain the context. "The line below"??? "it" is only saved?

Step back a bit, and bear in mind that we're volunteers, who can only work
with what you actually POST, not what you're thinking or what you see. I'm
guessing you're referring to my reply some time back about setting the
Default
Value of a control to the value entered, but other than that I have no
idea
what you're expecting, what you're seeing, or what you want.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com

John from
https://groups.google.com/forum/?hl=en&fromgroups=#!topic/microsoft.public.access/rLfy6gBP5X

REpeat memory
2 posts by 2 authors in microsoft.public.access
[Email updates to me] [Collapse all]
me (The Doctor change)
Post reply
More message actions
Sep 24 (6 days ago)
Quesion how do you tell an access application to remember a field?
--
Member - Liberal International This is (e-mail address removed) Ici
(e-mail address removed)
God,Queen and country!Never Satan President Republic!Beware AntiChrist
rising!
http://www.fullyfollow.me/rootnl2k
USA petition to dissolve the Republic and vote to disoolve it in November
2012
John W. Vinson
Post reply
More message actions
Sep 24 (6 days ago)
Quesion how do you tell an access application to remember a field?

If you mean to have a Textbox or other control on a Form become "sticky",
keeping the value most recently entered as the default, you can use a
little
VBA code in the AfterUpdate event of the control. Let's say you have a
form
with a textbox named MyText. The code would be

Private Sub MyText_AfterUpdate()
Me!MyText.DefaultValue = """" & Me!MyText & """"
End Sub

That's four doublequotes before and after; the Default Value property of a
control (whatever the datatype of the underlying field) must be a text
string,
and the quotes do this.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com



So I did as you told me, however what happens is

Once I type in the selected field it then repeat on the line
below.

All that is needed is the once type, the field or in this case fields
are memorised for future use.

--
Member - Liberal International This is (e-mail address removed) Ici
(e-mail address removed)
God,Queen and country!Never Satan President Republic!Beware AntiChrist
rising!
http://www.fullyfollow.me/rootnl2k
USA petition to dissolve the Republic and vote to disoolve it in November
2012
 
T

The Doctor

What the heck do you *mean* by "how do you tell an access application to
remember a field"? John gave you an answer to one way the question could be
understood, and your post did not explain anything additional.

BTW, you can't assume that everyone will have the message in a continuous
thread - you need to quote enough to establish context.

We try to help, but this isn't "microsoft.public.access.psychics" so you
need to provide us enough detailed information so we can understand what you
have, what you expected, and what actually happened... without that, it's
not just difficult but impossible to assist you.

Trying to explain that the form should not be duplicating a line
once typed; just memorise and stor for later if needs be.
--
Larry Linson
Microsoft Office Access MVP
Co-Author, Microsoft Access Small Business Solutions, Wiley 2010


The Doctor said:
All right, I did write this in the form,
however the line below is showing.

What must I do to make certain that it is only saved.

Please explain the context. "The line below"??? "it" is only saved?

Step back a bit, and bear in mind that we're volunteers, who can only work
with what you actually POST, not what you're thinking or what you see. I'm
guessing you're referring to my reply some time back about setting the
Default
Value of a control to the value entered, but other than that I have no
idea
what you're expecting, what you're seeing, or what you want.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com

John from
https://groups.google.com/forum/?hl=en&fromgroups=#!topic/microsoft.public.access/rLfy6gBP5X

REpeat memory
2 posts by 2 authors in microsoft.public.access
[Email updates to me] [Collapse all]
me (The Doctor change)
Post reply
More message actions
Sep 24 (6 days ago)
Quesion how do you tell an access application to remember a field?
--
Member - Liberal International This is (e-mail address removed) Ici
(e-mail address removed)
God,Queen and country!Never Satan President Republic!Beware AntiChrist
rising!
http://www.fullyfollow.me/rootnl2k
USA petition to dissolve the Republic and vote to disoolve it in November
2012
John W. Vinson
Post reply
More message actions
Sep 24 (6 days ago)
Quesion how do you tell an access application to remember a field?

If you mean to have a Textbox or other control on a Form become "sticky",
keeping the value most recently entered as the default, you can use a
little
VBA code in the AfterUpdate event of the control. Let's say you have a
form
with a textbox named MyText. The code would be

Private Sub MyText_AfterUpdate()
Me!MyText.DefaultValue = """" & Me!MyText & """"
End Sub

That's four doublequotes before and after; the Default Value property of a
control (whatever the datatype of the underlying field) must be a text
string,
and the quotes do this.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com



So I did as you told me, however what happens is

Once I type in the selected field it then repeat on the line
below.

All that is needed is the once type, the field or in this case fields
are memorised for future use.

--
Member - Liberal International This is (e-mail address removed) Ici
(e-mail address removed)
God,Queen and country!Never Satan President Republic!Beware AntiChrist
rising!
http://www.fullyfollow.me/rootnl2k
USA petition to dissolve the Republic and vote to disoolve it in November
2012
 
A

Access Developer

The Doctor said:
Trying to explain that the form should not be duplicating a line
once typed; just memorise and stor for later if needs be.

In a standard VBA module, define variables corresponding to the controls you
want to save, and write code in appropriate events to save the controls'
values in those variables. Then, when the conditions are met to reuse the
value(s), execute VBA code to copy the values back into the controls.

My suggestion, of course, does not address the issues of saving or not
saving the content of the form -- that can range from trivial (if you take
advantage of the fact that Access saves records from bound forms unless you
jump through some hoops to prevent it) to detailed and complex (if you use
unbound forms and have complex rules to determine what and when to save).

--
Larry Linson
Microsoft Office Access MVP
Co-Author, Microsoft Access Small Business Solutions, Wiley 2010


The Doctor said:
What the heck do you *mean* by "how do you tell an access application to
remember a field"? John gave you an answer to one way the question could
be
understood, and your post did not explain anything additional.

BTW, you can't assume that everyone will have the message in a continuous
thread - you need to quote enough to establish context.

We try to help, but this isn't "microsoft.public.access.psychics" so you
need to provide us enough detailed information so we can understand what
you
have, what you expected, and what actually happened... without that, it's
not just difficult but impossible to assist you.

Trying to explain that the form should not be duplicating a line
once typed; just memorise and stor for later if needs be.
--
Larry Linson
Microsoft Office Access MVP
Co-Author, Microsoft Access Small Business Solutions, Wiley 2010


The Doctor said:
All right, I did write this in the form,
however the line below is showing.

What must I do to make certain that it is only saved.

Please explain the context. "The line below"??? "it" is only saved?

Step back a bit, and bear in mind that we're volunteers, who can only
work
with what you actually POST, not what you're thinking or what you see.
I'm
guessing you're referring to my reply some time back about setting the
Default
Value of a control to the value entered, but other than that I have no
idea
what you're expecting, what you're seeing, or what you want.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com

John from
https://groups.google.com/forum/?hl=en&fromgroups=#!topic/microsoft.public.access/rLfy6gBP5X

REpeat memory
2 posts by 2 authors in microsoft.public.access
[Email updates to me] [Collapse all]
me (The Doctor change)
Post reply
More message actions
Sep 24 (6 days ago)
Quesion how do you tell an access application to remember a field?
--
Member - Liberal International This is (e-mail address removed) Ici
(e-mail address removed)
God,Queen and country!Never Satan President Republic!Beware AntiChrist
rising!
http://www.fullyfollow.me/rootnl2k
USA petition to dissolve the Republic and vote to disoolve it in
November
2012
John W. Vinson
Post reply
More message actions
Sep 24 (6 days ago)
Quesion how do you tell an access application to remember a field?

If you mean to have a Textbox or other control on a Form become
"sticky",
keeping the value most recently entered as the default, you can use a
little
VBA code in the AfterUpdate event of the control. Let's say you have a
form
with a textbox named MyText. The code would be

Private Sub MyText_AfterUpdate()
Me!MyText.DefaultValue = """" & Me!MyText & """"
End Sub

That's four doublequotes before and after; the Default Value property of
a
control (whatever the datatype of the underlying field) must be a text
string,
and the quotes do this.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com



So I did as you told me, however what happens is

Once I type in the selected field it then repeat on the line
below.

All that is needed is the once type, the field or in this case fields
are memorised for future use.

--
Member - Liberal International This is (e-mail address removed) Ici
(e-mail address removed)
God,Queen and country!Never Satan President Republic!Beware AntiChrist
rising!
http://www.fullyfollow.me/rootnl2k
USA petition to dissolve the Republic and vote to disoolve it in
November
2012


--
Member - Liberal International This is (e-mail address removed) Ici
(e-mail address removed)
God,Queen and country!Never Satan President Republic!Beware AntiChrist
rising!
http://www.fullyfollow.me/rootnl2k
USA petition to dissolve the Republic and vote to disoolve it in November
2012
 
J

John W. Vinson

Trying to explain that the form should not be duplicating a line
once typed; just memorise and stor for later if needs be.

The DefaultValue that has been set by the code will be VISIBLE on the "new
record" line. However it will not be stored in the table until you "dirty" the
new record by typing something into some other field.

I think you're just seeing the default value which WILL be added, but HAS NOT
YET been added.

But since you're choosing not to say what you're seeing in a way that can be
clearly understood, that's just a guess. I suppose we should be flattered at
your confidence in our clairvoyance!
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
T

The Doctor

The DefaultValue that has been set by the code will be VISIBLE on the "new
record" line. However it will not be stored in the table until you "dirty" the
new record by typing something into some other field.

I think you're just seeing the default value which WILL be added, but HAS NOT
YET been added.

But since you're choosing not to say what you're seeing in a way that can be
clearly understood, that's just a guess. I suppose we should be flattered at
your confidence in our clairvoyance!
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com

I lost the original thread.
 

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