473,216 Members | 1,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,216 software developers and data experts.

Save Contents of Unbound Field

Access 97 - I have a form with a single unbound text field. I want to have a
timer event which periodically saves the contents of that field. But I
noticed that if the focus stays on the field then then the text doesn't get
saved. It's like the text isn't there until focus is moved off the field.

So does anyone know how to grab the contents of an "uncommitted" field
without moving the focus?

By the way, I tried moving the focus away, saving, then moving back, which
works except that at the end of this all the text is highlighted, which
means the next character typed wipes everything !!

Hope this makes sense
Dave
Nov 12 '05 #1
2 2252
You'll need to refer to the Text property of the control instead of the
Value property (which is the default property). The Text property is only
accessible when the control has the focus, so you may still have to deal
with the selection issue, but you can do that by using the SelStart
property. The following example is untested, from memory, but should
hopefully serve to point you in the right direction ...

Dim txt As Textbox
Dim strTheText as String

Set txt = Forms!NameOfForm!NameOfTextBox
With txt
.SetFocus
strTheText = .Text
.SelStart = Len(.Text)
End With

--
Brendan Reynolds
"Dave Griffiths" <da**@k2computers.co.uk> wrote in message
news:c0*******************@news.demon.co.uk...
Access 97 - I have a form with a single unbound text field. I want to have a timer event which periodically saves the contents of that field. But I
noticed that if the focus stays on the field then then the text doesn't get saved. It's like the text isn't there until focus is moved off the field.

So does anyone know how to grab the contents of an "uncommitted" field
without moving the focus?

By the way, I tried moving the focus away, saving, then moving back, which
works except that at the end of this all the text is highlighted, which
means the next character typed wipes everything !!

Hope this makes sense
Dave

Nov 12 '05 #2
How are you saving the value? An unbound field would require an external
method of writing it's value. If you are depending on the form to do this,
then nothing will happen.

Mike Storr
www.veraccess.com
"Dave Griffiths" <da**@k2computers.co.uk> wrote in message
news:c0*******************@news.demon.co.uk...
Access 97 - I have a form with a single unbound text field. I want to have a timer event which periodically saves the contents of that field. But I
noticed that if the focus stays on the field then then the text doesn't get saved. It's like the text isn't there until focus is moved off the field.

So does anyone know how to grab the contents of an "uncommitted" field
without moving the focus?

By the way, I tried moving the focus away, saving, then moving back, which
works except that at the end of this all the text is highlighted, which
means the next character typed wipes everything !!

Hope this makes sense
Dave

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Andras Gilicz | last post by:
Hi VB fans I'm working on a relatively large project in VB6 with about a dozen forms, including graphs, labels, text boxes, etc. The software itself is actually a flow simulator with more or...
1
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
4
by: Rick Thiel | last post by:
Hello, I am trying to build a Crystal report VisualStudio.NET for an ASP.NET application. I would like to build a report that doesn't connect to any particular database at design time because I...
11
by: deko | last post by:
I need to create different recordsets based on queries that use data from unbound fields in a form. I've discovered that I can't do this, and instead need to save the data in question (usually a...
3
by: Dos Lil | last post by:
I have a unbound field in the subform(for calculating the datediff) which has the control property ==DateDiff("n",,). I have another unbound field in the main form which is for displaying the...
3
by: Pat | last post by:
Hello, I've used Sum() to total bound fields on a continuous form with no problem. However, I now have a continuous form, on which I use an unbound field to calculate the number of hours between...
2
by: Joe | last post by:
I have a form which displays data in 3 related tables. I want to give the user a prompt to save changes when any field has been modfied on the form. Is there a easy way to do this so the 1 or...
2
by: tkhouk | last post by:
I have a small form with two unbound look-up fields (one for an ID and one for last name). Each unbound field has a command button that actually goes to my table and brings in the records. How can...
2
by: KC-Mass | last post by:
I have a form that is used to ID and then load Excel files into Access. I use labels on the form to record which file was last loaded. That was accomplished with a simple lblFileLoaded =...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.