473,385 Members | 2,014 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,385 software developers and data experts.

Require data entry in both form AND subform

HI!!!

I am in the process of building an Accounting Database. I have two tables. The first table is the Journal Entry Header and the second table contains the Journal Entry Details (the accounts to debit and credit as well as the debit and credits themselves). Its a basic one to many relationship.

I have both tables on a form. The Journal Entry Header is on top and the Journal Entry Details is the subform. Is there a way I can force the user to fill out both the form and the subform before submitting the record?

Another problem is the tab key. If the controls of the form are filled out, the tab key allows the user to submit the data WITHOUT a entry in the subform and that is not good...

Any advice and suggestions would be appreciated!!! Thanks in advance!
Nov 14 '07 #1
6 4240
Rabbit
12,516 Expert Mod 8TB
How are they "submitting" the data, by inherent processes? Or are they manually doing it through a button press. By your tab description, it sounds as if it's a little of both.
Nov 14 '07 #2
If there is a way to suppress the "Tab Key" and prevent the User from "Tabbing" thru the controls, that would be useful....

In the end, however, I want the user to fill out the controls on the form as well as the controls on the subform. Two different tables that are linked together.
Nov 14 '07 #3
Rabbit
12,516 Expert Mod 8TB
You can turn off the tab functionality by setting the tab stop property of the controls to no. But most users expect this functionality.

However, my question was how are they "submitting" the data. What happens when they submit the data? What do you want to happen instead?
Nov 14 '07 #4
I would like to ensure that the JE Headers (the "one" of the one-to-many relationship) cannot be added to the table unless it has at least one JE_details (the "many" of the one-to-many relationship). The JE_details table is filled by using a subform and it is located on the form for JE Headers.

The accountants would ideally have to press a submit button that would validate the entries (both JE_Headers form and the JE_Details subform on it...)

Hope this is clear....
Nov 14 '07 #5
Rabbit
12,516 Expert Mod 8TB
Well, there's no need to turn off the tab key if it's not tabbing them to a new record. All you really need to do is to run a DCount to see if there's at least one record in the subform before running the rest of the command button code.
Nov 14 '07 #6
tezza98
38
when the user clicks the save button check to see if the inputs in the subform arent null

if they arent null then save the records, if they are null , pop up a message box, and set focus to the null input


Expand|Select|Wrap|Line Numbers
  1. public sub on_click()
  2.  
  3. If Me!Subform1.Form!ControlName.Value Is NULL then
  4. Msgbox "this subform value must not be null
  5. Me!Subform1.Form!ControlName.setFocus
  6. Else
  7. ' repeat for next input
  8. else
  9. DoCmd.SaveRecord
  10. End IF
  11.  
yes i know my code is not correct and full of mistakes but the fundamentals are there

this is a good site that i use to remind me how to get access to the subform values from the parent form and visa-versa

http://www.mvps.org/access/forms/frm0031.htm
Nov 15 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: edworboys | last post by:
I have designed a data entry form with a number of fields and a sub form. The first field (Country) is a combo box and the user selects a country. This, in turn reduces the number of options in the...
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...
1
by: Trent | last post by:
I am in the design phase of a new database and am having a devil of a time with a subform. I have three tables that relate to problem - Suppliers tbl, Customers tbl and a SuppliersCustomers tbl....
1
by: Momo4 | last post by:
I have a unbound main form with unbound fields that correspond to fields on a bound data sheet subform. As you enter data on the subform, the corresponding fields get updated through code (e.g....
1
by: KC | last post by:
Hello, I am using Access 2002. WinXP, Template from MS called Orders Mgmt DB. I have tweaked this DB to work for our small co. It has worked pretty well up until I made the mistake of deleting...
5
by: lottaviano | last post by:
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...
2
by: filbennett | last post by:
Hi Everyone, I'm generally unfamiliar with Access form design, but have programmed Cold Fusion applications for a couple of years. I'd like to build a data entry form in Access that allows the...
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...
1
by: NHNeedsHelp | last post by:
Hi, about to go nuts - I have a master form with 3 control buttons, user picks 1 for Const. job, 2 for Envir job and 3 for Geo job. Each button opens a subform containing the project number from...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.