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

some Subform doesnt display properly when setfocus is activate

4
Hi

I have a main form with 7 subforms where the master/child link is the RefID in the main form where the Main form is 1-many relationship to those subforms. All the subform have the same properties

I have setfocus on the last field on the each of the subform to move to the first field of the next subform when using Tab.

The problems only occurs when I create a new records. One of the subform doesn't display properly on the form, such as it shift down or become invisible. The other subforms works fine.

Does anyone have this problem before? why all the subforms have the same properties but one doesn't display properly.

I am desperate to solve this problems, could anyone please shed some light on this problem.

Thank you very much for your time.
Hong
Apr 28 '07 #1
7 2089
nico5038
3,080 Expert 2GB
I assume you're working with subforms in "Continuous" mode.
In such a case make sure that the length of the subform (the light gray area when in designmode) does fit the area displayed.
As you've noticed, Access forces the active control to be displayed and when it's the last (lowest) you can be in trouble.

Nic;o)
Apr 29 '07 #2
Hong
4
Hi Nic

Thanks for replying. All of my forms is single form. I have resize the Details are in the design view to minimal. I don't understand how to change the length of the Gray area you mentioned.

And what do you mean "when it's the last (lowest)?

Could you please shed some more light to this gray area?

Thanks
Hong

I assume you're working with subforms in "Continuous" mode.
In such a case make sure that the length of the subform (the light gray area when in designmode) does fit the area displayed.
As you've noticed, Access forces the active control to be displayed and when it's the last (lowest) you can be in trouble.

Nic;o)
Apr 30 '07 #3
nico5038
3,080 Expert 2GB
Just open the subform in design mode.
Now scroll to the bottom and see that the backgroud has a different (darker) color at the bottom. The separation line between the dark and light can be "lifted".
I always use that on the bottom and righthand side. Access will stop making the area smaller when it finds controls, so you can even "lift" the bottom line to the top ruler and nothing bad will happen :-)

Nic;o)
Apr 30 '07 #4
Hong
4
Hi Nic

There is a grey area with the line and I have move it all up and there is no where that I can lift up at all.

I use the below code on on exit of the last field of every subform to move to the first field of the next subform which cause this display problems.

Private Sub Corporate_Objectives_Exit(Cancel As Integer)
Me.Parent.SetFocus
On Error Resume Next
Me.Parent.RSF017_BranchObjectives.SetFocus
Me.Parent.RSF017_BranchObjectives.Form.Branch_Obje ctives.SetFocus
On Error GoTo 0
End Sub

Is there another way to fix it?

Many thanks and have a nice day.
May 2 '07 #5
nico5038
3,080 Expert 2GB
Hmm, only the last setfocus should do the trick, but I see an odd space in the fieldname:
Me.Parent.RSF017_BranchObjectives.Form.Branch_Obje ctives.SetFocus
sure it doesn't need to be:
Me.Parent.RSF017_BranchObjectives.Form.Branch_Obje ctives.SetFocus

Nic;o)
May 2 '07 #6
Hong
4
Hi Nic

That "odd space" is just a display error on this page only, there isn't any space on the actual code.
May 3 '07 #7
nico5038
3,080 Expert 2GB
Hmm, the behaviour puzzles me, but as I can't reproduce it, detection/curing is hard.

Did you check under the datatab of the subform's or all "Allow ..." properties are identical and that the trouble one doesn't use "Dataentry" ?

Nic;o)
May 4 '07 #8

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

Similar topics

7
by: ChrisR | last post by:
Hi guys My app is a simple Main form with a few Subforms that are not linked, and a few pop forms. Problem is: I have a pop form with a Listbox with a list of records related to the...
2
by: Debster | last post by:
I am having a hard time trying to figure out why my code is not working properly. I step through the code and check the values when adding the data to the table, but my Refresh or Requery is not...
1
by: Donna Sabol | last post by:
I have a form (frm_MAIN_RPT) that contains a combo box (Combo6) & subform (dbo_REQ_subform). The combo box is used to select the "cost center" data that will be displayed in the subform. From...
3
by: Steve Miles | last post by:
I've got a tabbed form with the 2nd tab containing a subform. I'm trying to avoid the need to use the mouse to set focus to the first field on the subform. I can use <CTRL><TAB> to open the 2nd...
1
by: sofakingfree | last post by:
I keep getting an invalid property assignment error when tring to reference a subform. All I am trying to do is substitute this: Forms!!.SetFocus for this: FormAndSubForm.SetFocus
1
by: MP | last post by:
I have a main form that has a subform which also has a subform: the main form is the first subform is the second subform is When I click on the button »AddNewSubSubRecord« (add a new record...
0
by: dhvenkat | last post by:
Hi all, Im facing issues in generating the second mail-merge document when the first document created is still open. Its a web based application, and we submit the details for mail-merge after...
10
by: AdrianGawrys | last post by:
Hi guys, I recently rewrote onClick procedure for Calendar on my form (frmRota). It opens record from tblRotas where field rDate is equal the one selected on Calendar. If such a record doesnt exist...
1
by: veteranwebdesign | last post by:
Hello, I have a main form. I want forms to open in a subform control box. What is the code for the option group to open the subforms in the control box. I didn't create subforms, I created...
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
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...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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...
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.