473,396 Members | 2,018 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.

Data Entry Error in Subform ("Isn't Valid For This Field")

I am using Access 2002 and have two tables (Main and Actions) linked
(in Relationships) on one field "CAL_ID" (primary key in Main Table).
Main Table is a list of equipment. Actions Table lists actions
performed on these pieces of equipment (calibration, cleaning, etc.) so
there are many records per every one record in the Main Table.

I have a form based on Main Table, containing a subform for Actions
Table. This is used for data entry: to add new pieces of equipment,
and new actions. The subform is linked master and child on the CAL_ID
field present in both tables.

Here is my problem: Whenever I go over to the subform and start
entering data in any field (date, combo box, memo field, etc.) I get
the message "The value you entered isn't valid for this field." As
soon as I hit the OK button, it allows me to enter data as normal. I
do NOT get this error when the subform is not linked master and child,
however then I don't get the corresponding Action records as I cycle
through the Main Table records. I also get the error if I have the
subform on Datasheet View. Does anyone know what is wrong? I don't
know if it matters, but the combo box has a Value List, and the Date
field had a Short Date format assigned (because I get this error
regardless of the field, I wouldn't think this affects it).

Liana

Nov 13 '05 #1
5 5396
What is the RecordSource of this subform?

If it is a query, and the query contains more than one table, then this
sounds like a known problem. If you are adding records to table B, and table
A has a field with a Default Value set, Access wrongly attempts to assign
the value to the field from table A. Naturally, this doesn't work, and the
result is the cryptic message that the value cannot be assigned. Removing
the Default Value from the field in the other table solves the problem.

Please post back again if this does not describe the situation you are
seeing.

--
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.

<lo********@hotmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
I am using Access 2002 and have two tables (Main and Actions) linked
(in Relationships) on one field "CAL_ID" (primary key in Main Table).
Main Table is a list of equipment. Actions Table lists actions
performed on these pieces of equipment (calibration, cleaning, etc.) so
there are many records per every one record in the Main Table.

I have a form based on Main Table, containing a subform for Actions
Table. This is used for data entry: to add new pieces of equipment,
and new actions. The subform is linked master and child on the CAL_ID
field present in both tables.

Here is my problem: Whenever I go over to the subform and start
entering data in any field (date, combo box, memo field, etc.) I get
the message "The value you entered isn't valid for this field." As
soon as I hit the OK button, it allows me to enter data as normal. I
do NOT get this error when the subform is not linked master and child,
however then I don't get the corresponding Action records as I cycle
through the Main Table records. I also get the error if I have the
subform on Datasheet View. Does anyone know what is wrong? I don't
know if it matters, but the combo box has a Value List, and the Date
field had a Short Date format assigned (because I get this error
regardless of the field, I wouldn't think this affects it).

Liana

Nov 13 '05 #2
Thanks for replying. The source isn't a query. It's a regular table.

Nov 13 '05 #3
In that case, it is most likely that the Format property of a text box on
the form or a field in the table is set incorrectly, or else the data being
entered is not appropriate for the type of field (e.g. a date or number
where you entered a string.)

--
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.
<lo********@hotmail.com> wrote in message
news:11********************@g49g2000cwa.googlegrou ps.com...
Thanks for replying. The source isn't a query. It's a regular table.

Nov 13 '05 #4
What I think is strange is that I get the error after hitting just one
keystroke. For example, the date is set to Short Date format in both
the table and the subform, but as soon as I hit a zero "0" (or any
other number), I get the error message. Likewise in the "Initials"
field, which is a straight up text box (on the form) and text field (in
the table) - as soon as I hit any character, I get the error.

Also strange is that once I clear the error message once, it accepts
all data just fine with no more errors. Is there a way to supress the
error message so it just doesn't pop up?

Nov 13 '05 #5
If it is just the first keystoke when you begin to add a new record, then
the most likely culprits are either the Default Value of a control or field,
or code in the BeforeInsert event of the form.

--
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.

<lo********@hotmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
What I think is strange is that I get the error after hitting just one
keystroke. For example, the date is set to Short Date format in both
the table and the subform, but as soon as I hit a zero "0" (or any
other number), I get the error message. Likewise in the "Initials"
field, which is a straight up text box (on the form) and text field (in
the table) - as soon as I hit any character, I get the error.

Also strange is that once I clear the error message once, it accepts
all data just fine with no more errors. Is there a way to supress the
error message so it just doesn't pop up?

Nov 13 '05 #6

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

Similar topics

1
by: edworboys | last post by:
I have a form (Prospect) with a subform (Document). The result I am looking for is this: The user selects a prospect which is made up of Prospect Name, Country, Company and Prospect Type. They...
6
by: Wayne | last post by:
I am designing a database which needs approximately 50 fields per record. The database user requires data entry to be via a single screen. If I follow good database design practice and split the...
10
by: Chris LaJoie | last post by:
Our company has been developing a program in C# for some time now, and we haven't had any problems with it, but just last night something cropped up that has me, and everyone else, stumped. I...
9
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a...
4
by: LFM | last post by:
I have a form that includes a subform for data entry. The subform is setup to view only one record at a time. I need to limit that subform to only allow the user to enter one record at a time,...
3
by: bosmatthews | last post by:
I have a main form with a subform and a second subform nested to the first subform. The data entry property for all three forms (main, subform and sub-subform) is set to "yes" because I am intending...
6
by: LeeAnne | last post by:
Hello! I have a problem with my fk's behind the main form. Here is the situation: Table PERSONS is behind the main form and table BANK_DETAILS is behind the subform on a different tab. There...
3
Jerry Maiapu
by: Jerry Maiapu | last post by:
Can please someone help me out. I am a beginner (of VB) I have a main form with a sub form created based on two tables having one to many relationships. i want to prompt the users a message...
2
by: Emily Lisker | last post by:
I am using Yes/No/Null number combo boxes per Allen Browne's instructions (http://allenbrowne.com/NoYesNo.html). My validation rule is: "Is Null Or 0 Or -1" I copied Allen Browne's lookup box...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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?
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.