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

Using a button to launch a second, linked form

3
Hi,

It has been a while since I have used Access and even then it was basic use. I think I am thus a little in over my head! Some advice would therefore be much appreciated.

The data input form for my database is essentially made up of 3 sections:
1) item description
2) where from
3) where going to

In order to prevent the main form from getting too cluttered, I want the relevant controls for section 2 (and again for section 3) in a separate - but linked - form that is opened (in a new window) at the click of a button.

I have managed to get as far as using a button to open another form. BUT, the forms don't appear to be linked: when tested, the dummy data used in the second (sub) form didn't appear in the associated fields in the underlying table(s) and warnings that I hadn't entered "required" fields [which were already completed in the first (main) form] were displayed.

[I should say, I do NOT want to view see the data on the sub-form unless I click the button...my understanding of the sub-form function built into Access is that it is not appropriate here????]

I am also a little puzzled as to what to do once the sub-form has been completed: I need the data to save and to return to the main form...

Clearly, I am missing something... if you could give me a hint (or two!!!) I would be grateful.

Thanks
Jan 6 '16 #1
2 1099
zmbd
5,501 Expert Mod 4TB
Have you considered using a tabbed control?
) Using Tabbed Pages on a Form
) Accessing Tabs on a Tab Control
) Create a tabbed form - the very basics

You can also add true subforms to the pages, many of us that do so, do so, via a "late binding" method; however, from your post, I don't believe that subforms are the way to go here... just a plan, simple, tab-control.
:)
Jan 6 '16 #2
jforbes
1,107 Expert 1GB
I whole heartedly agree that a Tab control is probably what you want. I use it often and it works well.

The one thing that struck me odd was the comment:
[I should say, I do NOT want to view see the data on the sub-form unless I click the button...my understanding of the sub-form function built into Access is that it is not appropriate here????
Typically, a Tabbed control will give you additional Screen Space to add fields from the Table that Form is currently based on.

A Subform gives you the ability to display information from a table that differs but is related to the Table that the Form is currently based on. An example of this is a Form to show order information. It would be based on the Orders table, but a Subform on that Form would show the Order lines from a different table that could be called OrderLines. Multiple Subforms like this fit on Tabs quite well.


Typically, the case of showing data or entering data only when a button is clicked is more of a dialog situation, where either the Data or the Validation of the Main Form varies greatly from what is needed to be displayed or gathered from the user. One example is using a Dialog Form to enter a New Order Line in the Order/Order Lines scenario, as the information needed for a new Order Line may rely on some advanced look up features that wouldn't fit on the standard Form display. Another (poor) example would be a Totals Form for the Order/Order Lines that would only be available when a manager is using the database so that dollar values aren't shown to anyone but managers.

When you need a dialog, use can do something like the following (there are lots of variations on this):
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm "NewOrderLine", acNormal, , , acFormAdd, acDialog
  2. Me.Refresh
The first line opens the Form as a Dialog, the second line refreshes the Main form after the Dialog Form has been closed.

The Tab Control is probably all you need, but hopefully this helps you understand your options a little better.
Jan 7 '16 #3

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

Similar topics

2
by: Jade Tippett | last post by:
I am trying to design a button in one form that opens another form and executed a button method within that form. I want to button to open a form based on a different table, then execute the...
1
by: dwilliamjoe | last post by:
VB.net, launch procedure, close form, the whole APP is deactivated. When I say deactivated, other applications (Wind Explorer, My computer, Ect...) come to the foreground and my app goes to the...
0
by: weezles | last post by:
hi I'm having trouble with using a linked form instead of a sub form on a 1 to many relationship. Then linked form can be accessed from various other forms. When it opens the linked form, if...
1
by: Chris | last post by:
I need a search form to perform. I have a Form and a subform. The subform is based off a query and the main form is unbound. The query runs perfect, however, I have a command button in the main...
3
by: Ronald S. Cook | last post by:
In my Win app, I'm needing to load a media file into my Windows Media Player control, and THEN read an attribute from the file. The thing is, the file has to be playing for a split second before...
6
by: efultz | last post by:
I am trying to figure out how to click on a button and have it open a web page. I am not asking for the logic to handle the click. Moreover I am looking for the logic that I need to run to actually...
1
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am...
3
by: Syoam4ka | last post by:
Hi, I want to change the backcolor of my button every second ,for example red, after a second blue, after a second re, then blue and so on...i need it in a web form not in a windows form(in winform...
5
by: Thelma Roslyn Lubkin | last post by:
I am still having trouble trying to use a popup form to allow user to set filters for the main form. The main form is based on a single table. The popup contains 5 listboxes, so the user can...
1
by: abcdriver | last post by:
Later edit: Too complex: The only thing I should know is: The submit button's NAME (and value) will only be sent if that particular button was used to submit the form, so you should be able to...
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: 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...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.