473,396 Members | 1,764 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,396 software developers and data experts.

Problem populating textboxes from VBA

I am attempting to populate several textbox controls
from VBA code. With each attempt, I get the following
error:

"The macro or function set to the BeforeUpdate or
ValidationRule property for this field is preventing
Microsoft Acess from saving the data in the field."

Naturally, I have no BeforeUpdate events or
validation rules defined for these fields. If I set
the error handler to "resume next," one textbox
is populated but the rest are not.

I have seen numerous references to this problem in
Google, but no solutions. Any suggestions?

Thanks
-Mark
Nov 13 '05 #1
2 1257
Hmm. . .I solved it by writing to the textboxes' "value" property
rather than their "text" property.

Someday I'll have to read up on why that is the case.
Nov 13 '05 #2
Thanks for posting your solution Mark.

In pure VB, Text is the default property for controls, but it is different
in Access. Being data orientated, Value is the default property in Access.
Text applies only while the control has focus, and refers to the text in the
control. For example, while you are entering a date, the Text might be:
12/13/
but that would never be accepted as the Value because it cannot be
interpreted as a date.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Mark" <no****@thanksanyway.org> wrote in message
news:Hq********************@speakeasy.net...
Hmm. . .I solved it by writing to the textboxes' "value" property
rather than their "text" property.

Someday I'll have to read up on why that is the case.

Nov 13 '05 #3

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

Similar topics

7
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
0
by: Stephen Cairns | last post by:
I am using Active Reports for .Net to produce reports which are displayed in aspx pages in the browser window. I have a problem though displaying parts of my reports in the browser windows. Does...
0
by: Rich | last post by:
I've got a tabcontrol with a number of databound textboxes on a tabpage (Form1). I've got a button that the user clicks that opens a dialog (Form2) and does a lookup from a database. The user...
3
by: luna | last post by:
theres no errors in my code - but it does nothing at all - its supposed to be populating text boxes!! any ideas ? (im am pretty new to all this) If Not Page.IsPostBack Then Dim search As...
1
by: needin4mation | last post by:
I have a database with values. I retrieve the data from that database. I want to display that data from the database on the webpage. Is it incorrect to take that data and assign it manually...
1
by: Ken | last post by:
I have an HTMLSelect server control that I am populating dynamically in the Page_Load event of my page. When I turn off VIEWSTATE, the HTMLSelect.Value property is blank when the page is posted...
1
by: amber | last post by:
I'm having an issue with a combobox that is making no sense to me at all. I have a form with several comboboxes/textboxes. The values in these boxes are based on a datarowview, which is based on...
3
by: Maya | last post by:
Hi all, We have a windows forms application with different controls used inside, each control has several input items such as textboxes and some treeviews.. etc. We have been trying to...
3
by: cluce | last post by:
for some reason all of my textboxes are not getting the required data. only the name, company and email txtboxes are getting the data. control source is NULL record source = dbo_table Private...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.