473,399 Members | 3,832 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,399 software developers and data experts.

Subform Question. Please help!

Dear All,

I am trying to put together a small homemade accounting database and
have encountered the following problems, hope you guys can help:

1) I have a subform which includes 3 columns- vochure number (more like
parent record number), credit field and debit field. My objective is to
create a warning box and lock user within the subform if the total sum
of the credit doesn't equal to the total sum of the debit field within
that master record. I would like to know if anyone can give me a small
piece of sample code.

2) I also have a date field within the parent form. I want to change
the date field within the subform equal to the parent field "on
active". However, when I place the code there, which looks something
like...
me.subform.form.datefield.value = ddate (ddate is a public storage
variable)
the datefield would give me a time value, let say 12:03AM instead of a
date value. Does anyone know why?

Thanks for your help,

Tom

Nov 13 '05 #1
2 1588
Tom Lee wrote:
Dear All,

I am trying to put together a small homemade accounting database and
have encountered the following problems, hope you guys can help:

1) I have a subform which includes 3 columns- vochure number (more
like parent record number), credit field and debit field. My
objective is to create a warning box and lock user within the subform
if the total sum of the credit doesn't equal to the total sum of the
debit field within that master record. I would like to know if anyone
can give me a small piece of sample code.

2) I also have a date field within the parent form. I want to change
the date field within the subform equal to the parent field "on
active". However, when I place the code there, which looks something
like... me.subform.form.datefield.value = ddate (ddate is a public
storage variable) the datefield would give me a time value, let say
12:03AM instead of a date value. Does anyone know why?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

1. Usually you can use the Form BeforeUpdate event to check if
everything is OK before saving the record. If everything is NOT OK then
just show a MsgBox & set Cancel = True. The record won't be saved.

2. Refer to controls on other forms in this manner:

Me!SubFormName!ControlName

or

Me!SubFormName.Form!ControlName

The last one explicitly indicates that the SubFormName is a form.

Use ! to separate collection items from their objects - Me is the object
(the form) and the ControlName is the collection item in the form's
default collection, Controls.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQtlpM4echKqOuFEgEQK88QCfavA03TIJCl5q6/0mem7coHd35MAAnAtA
IsZ5tMxManIoUCNUnOLLdOWm
=Zr1N
-----END PGP SIGNATURE-----
Nov 13 '05 #2
Tom Lee wrote:
Dear All,

I am trying to put together a small homemade accounting database and
have encountered the following problems, hope you guys can help:

1) I have a subform which includes 3 columns- vochure number (more
like parent record number), credit field and debit field. My
objective is to create a warning box and lock user within the subform
if the total sum of the credit doesn't equal to the total sum of the
debit field within that master record. I would like to know if anyone
can give me a small piece of sample code.

2) I also have a date field within the parent form. I want to change
the date field within the subform equal to the parent field "on
active". However, when I place the code there, which looks something
like... me.subform.form.datefield.value = ddate (ddate is a public
storage variable) the datefield would give me a time value, let say
12:03AM instead of a date value. Does anyone know why?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

1. Usually you can use the Form BeforeUpdate event to check if
everything is OK before saving the record. If everything is NOT OK then
just show a MsgBox & set Cancel = True. The record won't be saved.

2. Refer to controls on other forms in this manner:

Me!SubFormName!ControlName

or

Me!SubFormName.Form!ControlName

The last one explicitly indicates that the SubFormName is a form.

Use ! to separate collection items from their objects - Me is the object
(the form) and the ControlName is the collection item in the form's
default collection, Controls.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQtlpM4echKqOuFEgEQK88QCfavA03TIJCl5q6/0mem7coHd35MAAnAtA
IsZ5tMxManIoUCNUnOLLdOWm
=Zr1N
-----END PGP SIGNATURE-----
Nov 13 '05 #3

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

Similar topics

2
by: Nikki | last post by:
I am fairly new to Access so please be patient. What I would like to do is have a form with a subform to work like a pos system. When I scan a barcode it brings up the info associated with the...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
3
by: Nicolae Fieraru | last post by:
Hi All, I have a problem and I can't figure out how to solve it. My database has three tables: tblCustomers, with CustomerId and CustomerName tblProducts, with ProductId and ProductCode...
0
by: Tom Lee | last post by:
Dear All, I am trying to put together a small homemade accounting database and have encountered the following problems, hope you guys can help: 1) I have a subform which includes 3 columns-...
9
by: PC Datasheet | last post by:
I'm stuck on something that seems should be easy and I need some help. My main form has an option group with five options. My subform chooses from different lists depending on which option is...
1
by: dBNovice | last post by:
Please help! I have 3 forms: Task, Subtask, Elements. Elements is a subform of Subtask and Subtask is a subform of Task. I am able to navigate from Task to Subform to Element and from Element to...
4
by: Macbane | last post by:
Hi, I have a 'main' form called frmIssues which has a subform control (named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs. A control button on the main form opens a pop-up form...
13
by: Mary | last post by:
I'll pulling my hair out on this one and would be so appreciative of any help. I am creating a data entry form to enter results of a student survey. There are 40 questions on the survey. The...
4
theaybaras
by: theaybaras | last post by:
Hi everyone, You've all been such a huge help to me since joining, and I'd just like to take a second to let you know how much I appreciate it! That said, I have another supplication! ;) I have...
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
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
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.