UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Subfom    
 
   
peterb49
post Apr 26 2006, 06:50 PM
Post #1

New Member
Posts: 16
From: Australia



I have a form (Clients) with subform (Events) and two subforms to Events (Job Parts & Job Labour). When the two Job subforms open they open to show existing record as does the subform Events. I want these two subforms to only open to add new records. How do I force them to do this. They do if I make Events Add new Record (Command Button). But I only want new records going in these two forms (but not the Events form). I have set Data Entry property of these forms to open to add data only, I have tried using a macro DoCmd-RunCommand-RecordsGoToNew when these forms get focus but it doesnt work.
Any suggestions would be appreciated
Go to the top of the page
 
+
Jack Cowley
post Apr 26 2006, 06:56 PM
Post #2

Retired Moderator
Posts: 37,716
From: The San Francisco Bay Area



Set the Data Entry property of the forms in question to Yes. Now the forms will not show existing records and will be ready for data entry. You could also hide the suborms, leaving the data entry to No, and when a new parent record has been added then show the subforms. That way you will not see previous data.

hth,
Jack
Go to the top of the page
 
+
peterb49
post Apr 26 2006, 07:29 PM
Post #3

New Member
Posts: 16
From: Australia



I already have Data Entry property set to Yes, but it seems to be getting overridden by the Events Subform (which is the parent form for the two Job... subforms), Events is displaying an existing record until I click on Add New Record command button, then the two subforms initially show blank new record until data is added to Events then they revert to existing record
Go to the top of the page
 
+
Jack Cowley
post Apr 26 2006, 07:36 PM
Post #4

Retired Moderator
Posts: 37,716
From: The San Francisco Bay Area



Hide the subforms that are dependent on the Events subform until you move to a new record in the Events subform. Then show the subforms or always have the Events subform in Data Entry mode, but it is dependent on the parent form so that may not be what you would like to do.

Jack
Go to the top of the page
 
+
peterb49
post Apr 26 2006, 07:39 PM
Post #5

New Member
Posts: 16
From: Australia



How do I hide the subforms?
Go to the top of the page
 
+
Jack Cowley
post Apr 26 2006, 07:45 PM
Post #6

Retired Moderator
Posts: 37,716
From: The San Francisco Bay Area



A subform is a control on the form so it has a visible property under its Format tab. Click on the subform in question one time so that it has tiny black squares at the corners and midpoints of the line surrounding the control. Open the property sheet and set the Visible property to No. To change the visible property to yes you will have to do it programmatically when you are on a new record in the Events subform. This article will give you the syntax you need to properly refer to a control on a subform or subsubform.

hth,
Jack
Go to the top of the page
 
+
peterb49
post Apr 26 2006, 07:46 PM
Post #7

New Member
Posts: 16
From: Australia



Data Entry option on Events subform is not an option (there are too many labels with instructions on them). Is there no way I can force the two Job subforms to only accept new records? Any entries written to them go to a separate table ITEMS, which is viewable on a separate tabbed page as a datasheet anyway. But once more because of the amount of data on labels I cannot show the two Job subforms as datasheet
Go to the top of the page
 
+
Jack Cowley
post Apr 26 2006, 07:50 PM
Post #8

Retired Moderator
Posts: 37,716
From: The San Francisco Bay Area



Do you have a Tab control on your form? Would that work for separating your subforms? Also, how about creating help popups instead so many labels with instructions? Once the user knows the program will they need all the current instructions?

Jack
Go to the top of the page
 
+
peterb49
post Apr 26 2006, 07:55 PM
Post #9

New Member
Posts: 16
From: Australia



Each of the Job subforms are on a separate tabbed page and at present I am getting around the problem by having a Next button that takes the form to a new record, but it would be so much simpler if I could force the form to gonly open to a new record. I have tried the On Click properties on each tab but that doesnt work either. I really appreciate your assistance with this.
Go to the top of the page
 
+
Jack Cowley
post Apr 26 2006, 08:04 PM
Post #10

Retired Moderator
Posts: 37,716
From: The San Francisco Bay Area



You have to use the On Change event of the Tab Control to make the changes you need.

This is getting very complicated for me as you now have a tab control, subforms, subsubforms, etc. so I am not sure what to suggest. You could hide the tabs pages with the subsubform until there is data in the subform... That might be a solution, but I am grasping at straws as the form is becoming more complex with each post.... Not your fault as that is just how it is...

Jack
Go to the top of the page
 
+
Aquadevel
post Apr 26 2006, 11:08 PM
Post #11

UtterAccess VIP
Posts: 6,898
From: Earth...



Peter,

Since its getting complicated on what your end result is to be, can you possibly post your database <without any sensitive data in it>, Forms with Tabs/Subforms/SubSubForms can really be hard to 'follow', so we could possibly help you better?

If Jack thinks its 'complicated', know wonder his hair turned grey/white when he hit the 20K mark! (IMG:http://www.utteraccess.com/forum/style_emoticons/default/frown.gif)

good luck. (IMG:http://www.utteraccess.com/forum/style_emoticons/default/frown.gif)

Aqua
Go to the top of the page
 
+
peterb49
post Apr 29 2006, 05:14 PM
Post #12

New Member
Posts: 16
From: Australia



Thanks for your offer. Any help is appreciated. I will send the database as two posts as it is a split database. You will have to edit the linked tables.
Attached File(s)
Attached File  Copy of TraXX6-DB.zip ( 62.93K ) Number of downloads: 0
 
Go to the top of the page
 
+
peterb49
post Apr 29 2006, 05:29 PM
Post #13

New Member
Posts: 16
From: Australia



This is the second post with forms etc
Attached File(s)
Attached File  Copy of TraXX-6-Auto.zip ( 262.7K ) Number of downloads: 1
 
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 12:02 AM