473,659 Members | 2,662 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Macros, VBA, etc disabled. How to call 1 of 19 subforms from a main form combo box?

18 New Member
What is the best way for the main form combo box to bring up the correct sub-form of the 19 available?

The main form has a combo box called [cboCategory] which has the options of selecting Category 1-19. When creating a new record, the data entry user selects, let’s say, Category 3 from the combo box. I’d like the sub-form for Category 3 to appear in order for the user to finish the data entry. I’ve thought about a filtered “Next” button which leads to the correct sub-form. But this is ugly; it would be nice as a sub-form.

All 19 forms are identical. The only difference is the category and how that affects the IIf statement text of the associated checkboxes. I cannot combine all of this into one table, it has too many columns. Macros, Functions, VBA etc disabled on my network and will not be enabled. I cannot use most of the awesome suggestions I’ve received from this page. Things that should be simple and combined through code must be separated and complicated.

I had two tables, but now I have to turn one of the tables and it’s sub-form into 19 different tables and 19 different sub-forms because now I cannot write a private function to interpret the data that is input as needed, I now have to create 19 different IIf statements. One IIf statement is two large unless I could daisy chain queries. Which I do not know how to do either.
Mar 22 '16 #1
1 1036
zmbd
5,501 Recognized Expert Moderator Expert
Ouch. We can get into the politics as to why your IT disabled both Access Macros and VBA - and it's a red-herring as far as network security is concerned (good antivirus and anti-malware programs are more effective); however, it's their problem that they've crippled several hundreds of dollars of software and cost themselves even more in labor.

You may still have some minimal Macro control. If so, then we may have a few options:
+ Use the minimal "Safe" subset of macro actions to set and alter your form's subcontainer properties.
+ Use a tabbed form for all of your category forms
+ Use a form-navigation-control

I've attached a small database that will check to see what is going on, what I need you to do is to d/l ZIPed database, scan for virus using your company's anti-virus, either extract the database first or open the database from the zipped file (extracting first will make things much clearer from a "system messaging" point of view),

++ IF you have only one button click on it - the application should close and you're done. Report back here what happened - number of buttons and colour

++ IF you have two buttons, click on the first one. As above the application should quit. Re-Open the file, once you're to the final form, click on the second one. The application should quit.

++ You're more than welcome to inspect the macro and vba scripts before doing any clicking. The first button has an embedded macro that you can only see by opening form.f_splash in design mode, and showing the properties. The macro for the second control is the same... both just quit Access. The autoexec macro checks for trusted state and executes either macro actions within the same macro or the function found in the standard module.

When you open the database:
+ there should be two messages boxes that pop open.
+ You will see a form loaded in the background.
+ The form will either update and show zero, one, or two command buttons after you have clicked thru the two message boxes and the text will update to reflect what is going on.

Once we have a clearer picture as to what we have to work with we can dive into the deep-end

We may also discover that you might be able to do more than you think and can simplify a great deal of your database design!

-Z
Attached Files
File Type: zip TestMacoState.zip (36.9 KB, 49 views)
May 2 '16 #2

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

Similar topics

0
1783
by: Arnold | last post by:
Hi there, I have a form to organize bottles in mind, but am unsure if it will work. Here's some background info: Mainform = frmProduct, which contains fields for pricing, status, etc. of complete bottles, as well as an image control for a thumbnail of a complete product (bottle + cap). The mainform has 2 subforms that must be visible and side-by-side:
4
7002
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the user enters the last qualifying field on the main form. In one case this works fine, the subform shows the data the user wants to update -- which means showing all the data put in previously (ie showing this via the requery and the continuous...
1
2150
by: NBruch | last post by:
Ok let me explain what im trying to do: i need a combo box which needs to be linked to a listbox (or combo box doesnt matter which really) then the listbox should bring up the record in a subform. so you pick a name (in the combo box in the main form) then it should bring up all the dates for which the person has a record for (in the list box or combo box) and then once you pick a date it should bring up the specific record you want...
6
3794
by: MLH | last post by:
When the vehicle entry form (frmVehicleEntryForm) first opens, the additional owner SubForm control (frmAddnlOwnrListSubForm) is enabled. You can click on it and it will accept the focus. But after you enter data to the first field on the main form (a VIN#), that is not the case. The SubForm control becomes disabled and will not accept the focus. Dunno why. There's no child/master link fields. They have no settings - at least not in design...
1
2862
by: kinglioness | last post by:
Hello All, I am new to this forum so I apologize if this quesiton was asked already. Although i did search but i couldn't find. I have 2 combo boxes one unbound and the other bound they are on the main form. One (combo box) filters the other. I would like for both boxes to filter the subforms which by the way are on tab controls I have 8 pages. I am very new to vba, but I am trying to get a code that will filter whatever subform is...
1
1846
by: c0l0nelFlagg | last post by:
I need to display a main form with 48 identical subforms. 6 columns with 8 rows. I set up a separate query for each subform, identical in structure and underlying data except the criteria in two fields is different for each. (ie Row and Column id fields). I am able to select data in each subform from combo box lists, then on after update event I want to store data in a master underlying transaction table, both when each subform is...
5
5700
by: mdzeier | last post by:
I need to know how to maxinimze subforms to the size of the main form. I have managed to do the code to maximize the main form, but it does not work on the subforms. The main form contains 6 subforms which I need to maximize within the main form (the screen size). Manually setting the size of the subforms is frustrating as I have serval users of the front end, personnally on 3 different PCs (incl laptop). I regularly update the front end of...
1
4404
by: Gordon Padwick | last post by:
I’m still having a problem with using a combo box in a main form to select records to be displayed in a subform. I’ve tried code suggested in several sources, but it doesn’t work. In “Filter records based on a combo box selection in Access 2004/XP/2000/97,” Microsoft provides an example of a database that has two forms: frmCustomers (main form) and frmCustomers_sub (subform). Microsoft suggests this code for a main form to set a filter for a...
2
6324
by: Temirbek | last post by:
I have a form in Access 2007 which contains subforms. On the subform I disabled vertical bars so that I could scroll down and up using only scroll bar of the main form. When a subform field has a focus, the (vertical) scroll of mainform is disabled (i.e. I can't scroll down the page with mouse wheel)I have to click on scroll bar and move down. How can I enable mousewheel for that purpose?
0
7805
NeoPa
by: NeoPa | last post by:
Introduction : This article relates to the long-standing (Since at least Access 2.0.) problem whereby a Form, used within a Subform of another (main) Form, will have any temporary and transient design changes made during the time the main Form is open and in use, saved away automatically to become the new design of the Form. This is rarely desirable, yet is something Access does for you without any way to specify you don't want it to. ...
0
8427
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8330
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8850
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8523
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7355
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6178
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.