473,788 Members | 2,896 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Associate form events with default record navigation buttons

lwwhite
16 New Member
Another question. On one of my forms, I have two radio buttons: Topic and Window. Beside each of them is a drop-down to select the corresponding topic or window. When Topic is selected the window drop-down is disabled, and vice-versa.

But what I'd like to do is give the appearance of one field only. So I placed the topic drop-down directly on top of the window drop-down and set their Visible properties using the On Mouse Down event of the Topic and Window radio buttons. So far so good. Works like a charm when the form first opens.

Problem is, this is a child form whereby you view all the records associated with the record on the parent form, so I'm using the native Access navigation buttons at the bottom of the window to move from one record to another. When you move from one record to the next, the fields don't appear as predicted; the topic drop-down is always the one visible, even if the Window radio button is selected.

How can I (or can I) associate my On Current event with these buttons to have the form refresh itself for each new record?

Thank you!
Jan 22 '07 #1
1 2912
ADezii
8,834 Recognized Expert Expert
Another question. On one of my forms, I have two radio buttons: Topic and Window. Beside each of them is a drop-down to select the corresponding topic or window. When Topic is selected the window drop-down is disabled, and vice-versa.

But what I'd like to do is give the appearance of one field only. So I placed the topic drop-down directly on top of the window drop-down and set their Visible properties using the On Mouse Down event of the Topic and Window radio buttons. So far so good. Works like a charm when the form first opens.

Problem is, this is a child form whereby you view all the records associated with the record on the parent form, so I'm using the native Access navigation buttons at the bottom of the window to move from one record to another. When you move from one record to the next, the fields don't appear as predicted; the topic drop-down is always the one visible, even if the Window radio button is selected.

How can I (or can I) associate my On Current event with these buttons to have the form refresh itself for each new record?

Thank you!
Assuming that your Radio Buttons are in an Option Group (making them mutually exclusive), this Generic Code will work:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.  
  3. Select Case Nz(optTest.Value)
  4.   Case 1    'Topic Radio Button selected
  5.     Me![cboTopic].Visible = True
  6.     Me![cboWindow].Visible = False
  7.   Case 2    'Window Radio Button selected
  8.     Me![cboTopic].Visible = False
  9.     Me![cboWindow].Visible = True
  10.   Case Else 'No Button selected
  11.     Me![cboTopic].Visible = False
  12.     Me![cboWindow].Visible = False
  13. End Select
  14.  
  15. End Sub
Jan 23 '07 #2

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

Similar topics

1
2480
by: Steve | last post by:
I have a form with about 30 fields. Much of data entry for this form involves the same data for many of the fields. To save typing time, in the form's AfterUpdate event I run a procedure that sets the defaultvalue property of each field to the value of that field in the last saved record. Essentially what happens is when a record is saved it becomes the default new record in the form. I have some comboboxes on the form that draw their data...
15
4662
by: Steve | last post by:
I have a form with about 25 fields. In the BeforeUpdate event of the form, I have code that sets the default value of each field to its current value. For a new record, I can put the focus in any field to start. If I edit that field and then click on the new record button in the navigation buttons, the form goes to a new record and each field has the default value of the previous record. If I put the focus in any field to start, edit that...
0
2703
by: misscrf | last post by:
I am currently working on a database, in 3rd normal form, which is for candidates who apply for a job with the law firm that I workd for. My issue is with good form design. I have a main form. Then I have 3 pages on a tab control ( 4 if the type of candidate validates that is is to be shown) Each page has a subform. The subforms can be either single or continuous, I think I am still deciding what I want to lock down this entry...
8
12106
by: Zlatko Matiæ | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the combobox. What is the solution? Thank you in advance.
7
1736
by: sara | last post by:
I guess this is simple, but I'm stuck. I am trying to write a simple app - Newspapers and their circulation by town. tables: tblPaper - ID (autonum, key) and Newspaper (indexed) tblTown - ID (autonum, key) and Town(indexed) tblPaperTown - PaperID, TownID, DailyCirc, SundayCirc
12
12962
by: swingingming | last post by:
Hi, in the NorthWind sample database, when clicking on the next navigation button on the new order record with nothing on the subform (order details), we got an order with nothing ordered. How can we prevent this from happening? Thanks. ming
1
2546
by: Galka | last post by:
Hello I have a form to enter names and some other personal information. When a name is entered, it is checked against existing records: maybe, such name was entered before? If yes, user is notified and asked, would you like to see the previous record? If user answers yes, form on the screen is scrolled to the record with the same name. All works well, apart from number of record between navigation buttons: it is still the same number of...
13
3437
by: kev | last post by:
Hi all, I have created a database for equipments. I have a form to register the equipment meaning filling in all the particulars (ID, serial, type, location etc). I have two buttons at the end of the form which is submit and cancel. After i have clicked submit, the information is stored directly into my corresponding database table. My problem here is i need to retrieve back the information submitted to display all the data that the...
4
6058
by: Harlequin | last post by:
I have a question concerning the need to trigger events within a "child" subform which is itself enbedded within a master "parent" form and which is accessible via a tab in the parent form. Becuase this is all very difficult to explain in words, please bear with me as I endevour to explain what it is I am trying to do. It would be helpful if I could attach a graphics file to this posting that would help explain what it is I'm trying to achieve...
0
10172
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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
9967
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
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
7517
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
6750
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
5398
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...
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
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.