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

Unable to populate textbox 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 6060

Mark wrote:
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.


Could you post the code, please? Kinda hard to diagnose without it.

Edward

Nov 13 '05 #2

Mark wrote:
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.


Of course you don't! This MSAccess, remember?
But seriously, I have no clue, but here's A
20-question game for you :)

1. Could you have at one time HAD a BeforeUpdate event
and deleted it, or changed it's name? that can
really FUBAR things-

2. On your textbox, do you have a Format set, like
"General Number" which might be fouling up your
form (if you're entering data)?

3. Is your data in your database appropriate for any
format that you've set up for the textbox control?

4. Is your Input Mask (if any) appropriate for the
data that's going into the control?

5. Do you have a validation rule?

6. Do you populate the form from a query? and if so,
does said query populate your textbox field from a
left join? If this is true, you are asking Access
to populate more than one record from a single
textbox- and Access subsequently gets very conflicted
about what to do.

Also important is how you're saving the data; if these
are unbound textboxes, it may just be you have a flat-out
bug in your SQL statement (if you're saving data THAT way)-
Just some general ideas based on the information you gave-

HTH-
KC

Nov 13 '05 #3

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

Similar topics

2
by: C. David Rossen | last post by:
Hello: I have a registration form for classes. Each class has a fee. I have a drop down box whereby the user chooses his class. There is a textbox with the associated fee. I would like to...
0
by: anna | last post by:
I have a grid with some columns that are BOUND columns. I have three more columns that are TEMPLATE columns with textboxes inside. i need to populate one of the textboxes with information based on...
1
by: Celine | last post by:
how can we populate a textbox using information from database, using asp.net and c#
2
by: Rene | last post by:
Hi all i need some help. i try to send mail with the following code. Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click Dim...
14
by: Barney | last post by:
How can I populate a textbox from a dataview? I have a dataset i'm filtering on and i want to populate several textboxes based on that filter. How can i get that to work? I've tried: ...
2
by: Junior | last post by:
Hi All, I haven't got a response for this question lately and i really need to get this done ASAP. I have a .aspx page that has table two column four rows on it. 1. How do i use codebehind C#...
4
by: Mori | last post by:
I am using masterPage and I need to populate a textbox that is in a content control with data from popup page that is not part of the master page. This code works if no masterpage is involved. ...
11
by: eureka | last post by:
Hi All, I'm training in Servlets, JSP and JavaScript, I have a web page in which there's a "StudentName" textbox and below it is a "Names" Dropdown list. Initially the Textbox is empty and...
3
by: ashishc | last post by:
Hi All, I have written a AutoSuggest in jsp and am using javascript to call the strut page which calls the database and returns me the xml back. On the html page i have a text box where i enter...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.