Forms :: New Form Using Checkbox

Oct 10, 2013

I downloaded Checkbox open form.zip from this site. It uses option group for the checkboxes

It runs perfectly when I double click in access but i would like to use this in vba when called from another form. When i put the code in and try to run it I get the error:

Compile Error
Method or data member not found

It is referring to .Frame8

Here is the code I used:

DoCmd.OpenForm "Mainform", acNormal

Select Case Me.Frame8
Case 1
Open Form 1
Case 2
Open Form 2
Case 3
Open Form 3
Case Else
MsgBox "You did not make a selection"
End Select

View Replies


ADVERTISEMENT

Forms :: Making Textbox Visible On A Form If Checkbox Is Checked On Same Form

Aug 30, 2013

I am having a problem with making a textbox visible on a form if a checkbox is checked on the same form. I have done research on this site and have written the code below, but I am getting a Syntax error, see yellow highlight.

- My checkbox is named: Case is a Readmission from WRCA IP to WRCA IP
- My textbox is named: Date of Current IP Admission (I have defaulted this textbox to not visible).

Here's the code I have written:

Private Sub Case_is_a_Readmission_from_WRCA_IP_to_WRCA_IP_Clic k()
If Case is a Readmission from WRCA IP to WRCA IP =true then
Date of Current IP Admission.visible=true
Else
Date of Current IP Admission.visible=false

[Code] .....

View 14 Replies View Related

Forms :: Open Another Form If Checkbox Is Checked?

Apr 7, 2013

I am trying to write an IF statement as a macro on the OnClick property of a checkbox and can't get it to work. Basically, if the checkbox is checked (for Yes) I want it to open another form. (The checkbox is a field on a subform on a form).

I haven't even gotten this far yet, but I would also like the IF statement to include an AND somehow....in other words I want the IF statement to basically say if the box is checked for yes AND the offer status field ="Accepted", then open another form. If either is False, then I don't want it to do anything except display a message box saying they can't initiate a contract is both conditions aren't true.

View 2 Replies View Related

Forms :: Filter Form Using Checkbox And Combo

Aug 21, 2013

I have a reservation form and I want to tick a checkbox that will filter the form based on what is in the "Reservation Status" combo box.When the checkbox is ticked, the code would remove all records that have "Complete" as a status in the "Reservation Status" combo box. The non-working code that I currently have is:

Code:
Private Sub chkHideComplete_AfterUpdate()
On Error Resume Next
If Me.chkHideComplete = True Then
Me.filter = "[ReservationStatus] = 1"
Me.FilterOn = True

[code]....

View 7 Replies View Related

Forms :: Remembering If Checkbox Has Been Clicked In A Form

Jul 3, 2013

Here's the scenario:

I have a table of Clients, each of which can have zero or more Contacts. Clicking the Contacts button on the Client form opens a pop-up form that displays the Client's Contacts.

Each Client can have a default Contact, indicated by a DefaultContact checkbox on the Contact form. If the user checks this checkbox, I want to run a piece of code that checks whether any of this Client's Contacts are already set as default and, if so, warns the user before proceeding. If the user goes ahead, 'default' status is assigned to the current Contact & removed from the other.

It seems to me that the obvious place to do this is on the Contact form's BeforeUpdate event, when the record is being saved. However, it's only necessary to do this when the DefaultContact checkbox has been clicked. But there's no 'Dirty' flag for checkboxes & the only way I can think of is to set a global (within the scope of the form) variable and get the BeforeUpdate code to check it before running my 'Default Contact' code above.

View 6 Replies View Related

Forms :: Add Additional Filter To Unbound Form - Checkbox?

May 27, 2015

I need to add an additional filter to my unbound form and can't seem to get the syntax right -

I have a text field in my form "[B Style]" that has either a "Y" or "N"

I want to add a checkbox on my main form where, if checkbox=True then [B Style]="Y"

Private Sub ckBStyle_Click()
Dim stFilter As String
Dim stDocName As String
stDocName = "Modify_OpenItems"
If Me.ckBStyle.Value = True Then
DoCmd.OpenForm stDocName, , , ("[B Style]" = "Y")
Else: DoCmd.OpenForm stDocName
End If
End Sub

stDocName is opening but is completely blank.

Incorrect syntax?

View 1 Replies View Related

Forms :: Enable / Disable Checkbox On Continuous Form

Apr 5, 2015

I am asked to create a checklist for a number of tasks to be executed in a particular shift. However in some tasks can be skipped. There are three shifts per day.

To accomplish this i have created a continious form with a number of checkboxes per task which represent the days of the week. The tasks itself are stored in a seperate table with a checkbox per shift (task settings). If the tasks must be performed in a particular shift, the checkbox is activated (= true).

Goal here is, if a task doesn't have to be executed in a shift the task should not be visible on the continious form. The recordsource of the continuous form is a query, which contains a join between the table with the task settings and the table with the tasks performed.

I have placed some code to perform the task in the form's current event

In the continuous form current event I have placed for every checkbox the following code:

Private Sub Form_Current()
If Me. PerformTaskShift.Value = True Then
Me.MaandagOchtend.Enabled = False
End If
End Sub

However when i execute the code and load the form, not only the checkbox in the row mentioned are set invisible, all the rows are. Is there any way to set only the checkboxes on the rows mentioned invisible, in stead of all rows?

View 1 Replies View Related

Forms :: Opening A Form / Text Box When Checkbox Is Ticked?

Aug 19, 2015

I'm a novice user of Access 2013.

I would like to be able to use a checkbox control to make either text boxes or forms appear when ticked, ultimately to stop a form being so untidy/to conserve space. I'd be using this on multiple occasions.

(If actioned, would it automatically shift the other controls in the form down to make space, or would it just overlap?

View 4 Replies View Related

Forms :: Locked Checkbox To Make Form Fields Not Editable

Apr 3, 2013

I am using Access 2010 and I have my tables hidden in the navigation pane (I don't have any concerns about users finding the tables to make edits), however I am looking to "lock" all fields on a form once a user saves the record. The concern is that when they go to enter a new record they may end up on a previous record and overwrite the information. My thought was to create a checkbox on the table that I can edit each week to lock records. At that point, what type of code can I create or use that will lock records on the form?

View 2 Replies View Related

Forms :: Multiple Records From Single Form Based Upon Checkbox Values

Feb 10, 2015

Currently we track areas of non-conformance for a fleet of flight simulators. Each flight simulator has a particular ID number. In some instance an area of non-conformance is associated with a single simulator, at other times it is a fleet wide issue and applies to all or some simulators. In order to track as well as advise leadership and the contractor responsible for maintenance of the simulators of the situation we generate individual response letters.

In order to track each instance of non-conformance my idea was to create a new record for each deficiency. In the event that it is applicable to multiple simulators I would like to fill out the form with all pertinent data and then place a checkbox associated with each simulator and when the record is saved, it creates one record for each simulator with a checkbox ticked.

Once the deficiency on each simulator is fixed, I would check a box for a field called rescinded, which would remove that particular deficiency on that particular simulator from the active list of deficiencies but the others would still remain because they are associated with unique records.

View 14 Replies View Related

Forms :: Disable / Lock Fields On Form And Subform Based On Checkbox

Feb 15, 2014

I am trying to lock records on a form and subform after a checkbox has been ticked, have used the code below from a previous post.

Private Sub Form_Current()
If Locked = -1 Then
Me.AllowEdits = False
Me.AllowAdditions = False
Me.AllowDeletions = False

[Code] .....

This is locking the Main form records is there a way to code this so that the fields on the subform are also locked when the checkbox is ticked?

View 7 Replies View Related

Forms :: Check / Uncheck Checkbox On Parent Form If Records Exist Or Not In Subform

Jul 23, 2015

I have a parent form which has a yes/no checkbox in the form's record source. Then in that parent form I have a sub-form. If NO records exist in the sub-form I want the checkbox to be UN checked. If records DO exist in the sub-form, I want the checkbox to be CHECKED.

But I want this to happen as records are added or deleted from the sub-form. In other words, if the parent form is opened and no records exist in the subform then the checkbox should be unchecked. But as soon as the first record has been entered in the subform, the checkbox on the parent form should be checked. Likewise, as soon as the last record has been revoved from the sub-form, the checkbox on the parent form should be unchecked.

What code do I need to accomplish all of this?

View 1 Replies View Related

Forms :: Boolean Checkbox Updates

Aug 4, 2013

I use a form for changing data. So when the user selects a record from a listbox I fill all fields of the form with the content relating to the selected line in the box. Nearly everything runs as wished.

All updates take place immediately but the Boolean field does not update or better it updates only after I move the cursor over it. Then it is correct. To make it clear, I do not need to press a button or click, I only move the cursor over the boolean checkbox.

I access VBA after clicking the line in the listbox and use the dlookup command to get the right values. Do I need something like a requery for a boolean field ?

View 3 Replies View Related

Forms :: Conditional Formatting For Checkbox?

Nov 24, 2013

I have a continuous form that has several checkboxes in it. Only one is initially enabled and I want the first to impact if the others are enabled, but only in the currently selected record.

I tried VBA but quickly found that this enables/disables the checkboxes in ALL of the records. Next I found out about conditional formatting--which does exactly what I want, but only works on text boxes and combo lists.

Is there any way that conditional formatting can be used to impact (vs. be impacted by) a checkbox?

View 6 Replies View Related

Forms :: Can't Enable Checkbox In A Subform

Aug 12, 2013

I have a subform in datasheet view. In the main form I have various combo boxes to filter the data in the subform. I want to be able to check off the checkbox in the subform then filter all records that are checked, however, I am not able to check any of the checkboxes when I'm in my main form.

Example:
Sales Region, Order Date, are two fields

I can go in and select "north", "5/20/2013" then filter and let's say I get 55 records

So within the north region on 5/20/2013 I only want to select 5 of the 55 records by checking them off in the subform then in the main form I would drop down the unbound combo box to 'yes' and it would give me all records in the 'north' region with an order date of '5/20/2013' that I checked which should be 5 in this case. But, it won't let me check the box in the subform.

View 3 Replies View Related

Forms :: How To Hide A Tab If A Checkbox Is Checked

Jan 10, 2014

My tab name is SPA and it is the third tab in my form. I want to hide it if the AddToSPA checkbox is checked. This is what I have but I'm getting error 'Compile error: Method or data member not found"

Code:

Private Sub Form_Load()
If Me.AddToSPA = True Then
Me.SPA.Pages(2).Visible = True
Else
Me.SPA.Pages(2).Visible = False
End If
End Sub

View 6 Replies View Related

Forms :: Checkbox Interaction With Queries

May 22, 2013

1. In a form that I have created, I have a checkbox that I want to have checked when the form (ticket) that was filled out has been completed by our company. I want the checkbox to only be accessed by us. How do I achieve this to only certain users have access to check that box?

2. I have a main screen that the form is able to be accessed by. In that home screen I have a query that shows what tickets have not been completed (checked). How do I get those tickets that have been checked, to not show up on that screen?

View 4 Replies View Related

Forms :: Filter Text And Checkbox?

May 24, 2013

I'm having a hard time with this (what I thought) was a simple filter. I have an unbound checkbox (chkFlag) and an unbound text box (txtfilter). The filter was working fine till I decided to also try to filter on the checkbox.

I'm trying to filter records that either have either a check in the [Flag] field or have some part of the text in various other fields. The problem is I can get the records to filter if the checkbox is checked or on text in the various fields, but not both. I've tried using AND and OR, but it's not working.

Code:
Me.RecordSource = "SELECT * from tblContacts; "
'-------------------
strWhere = ""

[Code]....

View 4 Replies View Related

Forms :: DLookup For Unbound CheckBox

Jun 29, 2014

On my Login form I am trying to get the status of a user. Form and checkbox are unbound.

tblUserSecurity_Sec
userID is the UserName.
Field (Active) Data Type is Number, Field Size is Integer

CheckBox is (chkactive)

If DLookup("[Active]", "tblUserSecurity_Sec") = -1 And [userID] = (Me.txtUserID) Then
Me.chkactive = -1
End If

View 11 Replies View Related

Forms :: Using Multi-checkbox Value In A Query

Oct 16, 2014

I am new to access forms. I am trying to use the 2 checkboxs for my make table query.

Future cost checkbox and marginal cost checkbox.

If future cost is checked, then I want 00 as criteria for the field cost type in the query, if marginal is checked then 01. If both checked, then I want both.

Seems like a iif statement is not working in my query. I am trying to create an event now but I do not understand the VB codes.

View 8 Replies View Related

Forms :: User To Select Only One Of Checkbox Out Of Three

Jan 15, 2014

I have three check boxes in my form and i want the user to select any one of the check box, if not, i want to display an error msg? How to do it?

View 2 Replies View Related

Forms :: Checkbox Be Visible Only If A Textbox Has Text In It

Jun 12, 2014

I would like to have a checkbox be visible only if a textbox (Text246) has text in it.

Code:

Private Sub Text246_AfterUpdate()
Me.Check275.Visible = Text246
End Sub

View 2 Replies View Related

Forms :: Checkbox That Looks Like A Button - Access 2007

Mar 27, 2014

Is it possible to have a control with the appearance of a button (clicked or unclicked) but with the characteristics of a checkbox (can only hold a true or false value)?

Like the toggle button in an option group (i.e. On/Yes/True shows as a sunken / depressed button, Off/No/False shows as a raised / unpressed button)

I can't use an option group because I only want one button - which will either be on or off / clicked or unclicked based on the value it's bound to (a Yes/No field)

Is this possible?

View 2 Replies View Related

Forms :: How To Archive Data In Table With Checkbox

Sep 26, 2014

I need to archive some data in a table with a checkbox on a form. I have tenants table & property tables. Sometimes tenants move out & new move in but i don't want to delete information from old tenant. But i can't have duplicate property id's assigned to different tenants.

So I made a checkbox on the tenants form that sets the tenant to active or inactive with a status column in the tenant table. how do i delete only the property ID so i don't have duplicates when the new tenant moves in?

View 1 Replies View Related

Forms :: Password Protect A Checkbox With Particular Record

Jul 15, 2013

I have a checkbox that when checked will close that particular record from future editing. I want to be able to password protect this checkbox. Also I want to be able to uncheck this box with a password if we need to reopen that record.

View 2 Replies View Related

Forms :: Checkbox Label Color Change

Apr 21, 2013

I have several forms that each has a dozen or more checkboxes, true/false. I want to be able to change the background color of the label of each checkbox depending on if the checkbox is true or false. I have used the following code which works great:

If Me.A = True Then
Me.lblA.BackColor = vbYellow
Me.lblA.BackStyle = 1
Me.lblA.ForeColor = vbRed
Else
Me.lblA.BackColor = vbWhite
Me.lblA.ForeColor = vbBlack
End If

Me.A refers to T/F checkbox A and Me.lblA refers to its label. This is repeated for each of the checkbox controls. If the control is [B], then its label is lblB. I have used this in the form OnCurrent event and the checkbox control OnUpdate event. I was wondering if I could use the tag property to this, saving me writing countless lines of code and having the OnCurrent event of each of the forms so long and cumbersome. And I do know that I can use conditional formatting to do this, but I would prefer not to use that method. Is there any way to do this using the tag property and not so many lines of code?

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved