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

Form Appearance

7
I would like to have the area on my form, where a subform is located, to be an empty box with a border when the main form is initially opened. Then when user clicks on a button, the actual fields comprising the subform are visible, ready for the user to enter the required data.

The main form is an initial entry point in which the user can select four options (Insert new data, delete existing data, query exisiting data, and save data), which is why I would like the inital appearance of the form to be the four buttons and an empty box where the subform will eventually be displayed.

Any suggestions?!

Thanks

Hawg1
Sep 23 '06 #1
7 2503
PEB
1,418 Expert 1GB
Ok,
In your on Open Event procedure you type:

If your subform is based on columns / datasheet:

Expand|Select|Wrap|Line Numbers
  1. Me![SUBFORM].Form![F1].ColumnHidden = True
  2. Me![SUBFORM].Form![f2].ColumnHidden = True
  3.  
  4.  
If your subform is like form view:

Expand|Select|Wrap|Line Numbers
  1. Me![SUBFORM].Form![F1].Visible = False
  2. Me![SUBFORM].Form![f2].Visible = False
  3.  
In the case of form view it's better to put a rectangle box on top that you change its visible option to visible or invisible!

:)
Sep 24 '06 #2
hawg1
7
PEB,

Thanks for the code suggestion. I understand that the name of the subform goes into the [SubForm] part of the code.

I'm unsure what should go into the [F1] or [F2] part. Could you please elaborate for me? I'm new to VBA and am slowly learning all of the terminology.

Thanks for your help

Hawg1
Sep 24 '06 #3
PEB
1,418 Expert 1GB
No, no, no

This code you have to place it in your Main Form, On Open Event you assign Event procedure and you store the code there!

SUBFORM is the name of the control that is stored your subform

AND f1 f2 and so on are the names of the fields in your subform that you want to control from your main form

Now is it more clear?

Hope yeah!

Best regards!

:)
Sep 24 '06 #4
hawg1
7
PEB,

I'm probably losing it as I can't seem to get it to work. I keep getting error messages that state 'can't fine field...'

So I figured I would start over some what. I created a new blank form called hide test in design view. I then draged the form PersAction_PersData (contains several text/combo boxes) onto the detail section of the form hide test. Save and open the form and the subform is present.

I then enter the following into the OnOpen event of the form hide test (to save time, I only used the first text box on the subform):

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2. Me!PersAction_PersData.Form!SSN.Visible = False
  3.  
  4. End Sub
When I open the form I get the following error:

RunTime Error '2465':
MS Office Access can't find the field 'PersAction_PersData' referred to in your expression.


What am I missing or doing wrong?


No, no, no

This code you have to place it in your Main Form, On Open Event you assign Event procedure and you store the code there!

SUBFORM is the name of the control that is stored your subform

AND f1 f2 and so on are the names of the fields in your subform that you want to control from your main form

Now is it more clear?

Hope yeah!

Best regards!

:)
Sep 24 '06 #5
PEB
1,418 Expert 1GB
Hi,
The only reason to have this error is that the control

PersAction_PersData doesn't exist in your form!

Pls check the name of your control that is stored your form and verify that it's name is:

PersAction_PersData

This is not name of form but name of control!

:)
Sep 25 '06 #6
hawg1
7
PEB,

Thanks for the help. I got her working. I finally decided to just delete the subform and install a new one on the main form and everything is working.

Hi,
The only reason to have this error is that the control

PersAction_PersData doesn't exist in your form!

Pls check the name of your control that is stored your form and verify that it's name is:

PersAction_PersData

This is not name of form but name of control!

:)
Sep 26 '06 #7
PEB
1,418 Expert 1GB
Good solution !

Best regards!

:)
Sep 27 '06 #8

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

Similar topics

3
by: Hodad | last post by:
I would like to adapt, as much as possible, the appearance and color red of the font in this button: <P><CENTER><BUTTON VALUE="SUBMIT"><A...
7
by: Heath | last post by:
I was reading that it is considered bad form to require a browser to redraw the page after it has been loaded, ie image swaps or color changes using the pseudo-class a:active or a:hover, is is this...
1
by: Pablo | last post by:
I do not know like changing the color of bottom of: a menu, of the bar of the title of form, messagebox?
3
by: Rich Wallace | last post by:
Hi all, How can I load a form and display it in the lower right hand corner and have a 'docked' appearance to the system tray? TIA, -Rich
2
by: Grumpy Aero Guy | last post by:
I have upgraded an extensive solution to VS 2005 from VS2003 ... no problems. I notice that in VS2005, the forms, when viewed in design mode, have a different appearance than they did in 2003,...
8
by: hoofbeats95 | last post by:
I don't think this should be this complicated, but I can't figure it out. I've worked with C# for several years now, but in a web environment, not with windows form. I have a form with a query...
2
by: =?Utf-8?B?Um9ja3k=?= | last post by:
If the network cable is unplugged I need to change an image on my main form status bar, however this does not work ' The computer has been connected or disconnected from the network If...
3
by: =?Utf-8?B?R3JlZw==?= | last post by:
I am used to using third party controls when it comes to setting up appearences. But, now I am using Visual Basic.Net controls that come standard with the product. I've come across a frustration...
2
by: Zippy | last post by:
I have a mainform with two subforms controls (SF1 & SF2) for user input. There is a very slight difference in functionality between the two and I would therefore like both SF1 and SF2 to show the...
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
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...
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.