Forms :: Requery Text Box Based On Check Box Selected

Sep 10, 2014

Is it possible to have a query that will requery value of a check box based on which check box is selected? I have a form that has 5 check boxes and a text field for populating a unit price. When someone clicks a specific check box, the text field should display the unit price. I know how to accomplish this using a combo box and don't want to change the form to setup for a combo box, but rather use what everyone is currently used to. I want to add the check box is from 1 table linked to a form and the unit price is from another table not linked to a form. Both tables have 2 fields in each that will relate.

View Replies


ADVERTISEMENT

Forms :: Split Form Combobox Requery Based On Row Selected

Oct 2, 2013

I have a split form that was not made by wizard. On the form part I have a combobox that is unbound to the form data set. The combobox has a query row source that is based on the current row selected. I want the combobox to have an up-to-date result based on which row is selected.

If I set the combobox to requery in the form_current event then I get what I want. I don't want to put up with the little delay that is generated every time a user changes rows because of the requery, though. I only want the requery to happen when they use the drop-down menu.

I have the requery in the gotfocus event of the combobox on the form. I mostly get what I want this way, however if they select an item in the drop-down list, then choose a new record in the datasheet, then try to use the combobox again, the combobox is not refreshed (because it never lost focus?).

To get around this, I've tried to setfocus to something on the form in the on_current event, but access gives me an error: 'Access can't move focus to the control btn_Refresh'.How can I get the combo to requery only when users are about to use it?

View 4 Replies View Related

Modules & VBA :: Text Font Color Based On Tab Selected?

Aug 8, 2014

We have a navigation page with 5 tabs and several navigation buttons underneath their respective tabs linking to reports.

In the main part of the navigation page we have 17 search parameters (text boxes and combo boxes)that the user can use to sort through all the reports we have in the different tabs.

What we would like to do is to have the label text to change to "red" if one of the 17 fields are "required", remain "black" if it is included in the report but not a mandatory search parameter, or turn "light grey" if that parameter is not included in that report.

For example:

My search parameters are: people, phone, and cars

If I were looking at a report of people that included addresses, phones, etc...name and phone would be required search parameters. However, even though I can search by car, it is not in this particular report and the label text should be greyed out. (If the actual text box could go inactive that would be even better).

I have read about buttons being turned colors based on a drop down box choice, but I have not been able to find anything about using a navigation tab subform button to make the colors change in the main navigation form.

View 14 Replies View Related

Update Text Boxes Based On Date Selected In A Combo Box

Sep 12, 2006

I have a form that our operators use to do their hourly quality audits on. This is getting to be a huge burden on them because right now, they enter the date, the week ending date, the month every time they have to do an entry, and for me it is a nightmare because they can still enter the wrong information. So, what I was wondering is if there is a way that I can have them select the date from a combo box (easy enough), but from that, have the week ending date and the month fields automatically update as well. Any advice? I would really appreciate it! Thanks so much!!!!

View 3 Replies View Related

Modules & VBA :: Text Box To Become Visible Based On Selected Items From List Box

Oct 13, 2014

I have the code below and am trying to have a form allow Text Box to become visible based on selected items from a List box. Why I am getting the error listed?

Compile Error: Invalid Qualifier

Code:
Private Sub specific_opt_Click()
Dim users As Control
Dim ctrler As String
Dim xx As Long
If Me.specific_opt = True Then GoTo 169

[Code] ....

View 8 Replies View Related

Remember The Selected Record - Requery - Then Go Back To Selected Record...

Jun 28, 2005

Hi guys,

Bit of a problem I'm hoping someone can help with. I have a telephone call logging system. The system is a tabbed form with each tab representing a person's Telephone Call Inbox. As new calls are entered into the database, they appear in each person's inbox until they are marked as dealt with.

This all works fine and there are no problems with the basics of it, but the problem I do have is that after I have split the database into a Back end and a Front end and distributed the Front ends to each user, when a new call is entered it doesn't appear in the persons inbox until they do a requery.

At first I sent the form to requery using the ontimer event, but the problem I have is that after every reqery the form goes back to the first record. A user on the office forum suggested I use the following code:

vCurrent = Me.Bookmark
Me.Requery
Me.Bookmark = vCurrent

But this gives me invalid bookmark errors, so I was then told to add

On Error Resume Next

But this stops the bookmark function working and instead the first record is loaded every 1 minute (as set by my timer).

Can anyone recommend a better way that actually works without invalid bookmark errors?

View 14 Replies View Related

Modules & VBA :: Requery Once A Combo Box Selected

Jul 15, 2013

I have a form which contains two sub forms. In the first subform I have 4 fields of Cut#, Size, Quantity and Style. Once the cut# is selected, a vba code runs and fill in the rest of fields. In second sub form I have a field of Fabric# (Combo Box) which should be restricted to the Style value on the first sub form. I have a query which contains the Fabric# and Corresponding style and I try to write a vba code to requery once Style value changes.

View 14 Replies View Related

Forms :: Populate Listbox Based On Selected Record

Jul 15, 2013

I'm using a sub form to display data form a table. The users wanted it display like a spread sheet. In order to get all the data to display on the same page I am trying to break some of the longer feilds out (i.e. comment field) and display them in a list/text box and not in the table with the smaller fields.

Basically what will happen is when a record is selected in the sub form the comment field tied to each record will be displayed below. I've tried a few things but I keep getting errors displayed in my list/text box (#Name?)

View 14 Replies View Related

Text Get Selected On Opening The Forms

Feb 12, 2006

Dear All

I have a form with memo field as [acLetter]. Now whenever I open the form the text in the memo forms are all selected/highlighted in all the records. Is there any settings required to disable this feature or have I missed out something, so that the text should not be selected at the time of opening the form.

Thanks

View 1 Replies View Related

Forms :: Filter A Form Based On Date Selected From Combo Box

Dec 29, 2013

I have a form that is filter based on a combo box. I would like to add another filter for date. but the code I'm using for the first combo box doesn't work for date.

the code is:

Sub SetFilter()
Dim LSQL As String
LSQL = "select * from Preventive_Q_View"
LSQL = LSQL & " where Item_Name = '" & Combo206 & "'"
Form_Preventive_View.RecordSource = LSQL
End Sub

How do I modify this code to work with the date combo box? Also, is there a way to get both filters to work together, as in filter based on the first combo OR the second combo, OR both?

View 1 Replies View Related

Forms :: Control Option Buttons Based On Selected Date

Jun 28, 2013

I'm building a workCube reservation system and I've been tasked to have it work kind of like an airplane seat reservation system. I've laid out my form with option buttons representing the location of each available space. (space1, space2, space3...space16)

My desired outcome is to be able to select a date from a calendar popup and have the options buttons react to that date if they have been reserved. (change color and indicate "reserved").I've tried to create the form based on a query which represents the "booked" table.

Tables:

Employee
(k)empID
emplyeeName

Space
(k)spaceID
space

Booked
(k)spaceID
(k)empID
(k)bookdate

Some rules a space can be booked by any ONE employee on any day.How can I get any and all of the option buttons to react if there is a reservation in place on the day indicated by the calendar?

View 4 Replies View Related

Forms :: Get Selected Text From Textbox As Filtering String For Another

Aug 1, 2015

So, I have a main form with two continuous subforms like this:

frmContratos: main form
frmContInsumos: contains new products
frmInsumos: contains existing products

I want the user to highlight a word using a double click in a textbox called DescInsumo from frmContInsumos. And I want that highlighted portion to be used as filter for frmInsumos, which also has a textbox called DescInsumo. I used this and it's giving me the word, but it doesn't work with the double click event:

Code:
Private Sub DescInsumo_Click()
Debug.Print Me.DescInsumo.SelText
End Sub

View 4 Replies View Related

Forms :: Check For Duplicates Based On Name

Aug 7, 2015

I have a form (MemberDetails) and I want it to check if the member I'm adding has already been added, or at least give me a warning that the member might be a duplicate. I have a FName field and LName field that I would like checked (together). I know it's possible because I've seen it done on the Address Book template, but they have it set up to where the First & Last name are saved as one field in another table.

Expression used in the template, here it is.

=IIf(DCount("*","[Contacts Extended]","[ENV_NUM]<>" & Nz([ENV_NUM],0) & " And [Contact Name] = '" & Replace(Nz([Contact Name]),"'","''") & "'")>0,"Possible Duplicate","")

View 14 Replies View Related

Forms :: Auto Fill In A Text Box If Value Selected From Last Of 4 Cascade Comboboxes

Dec 9, 2013

I use access 2013.

1) How to auto fill in a text box if you select a value from the last of 4 cascade comboboxes.

I have 4 comboboxes where

1 = Apparaat - cboApparaat
2 = Type - cboType
3 = OS - cboOS
4 = Probleem - cboProbleem

With all 4 comboboxes I have the vba code Me.cbo[name combobox].Requery

If I select the last combobox, cboProbeem. I want the textbox underneath to automaticly fill in the solution of that problem. I already tried to use the following vba code

Me.Oplossing = Me.cboProbleem.Column(5)

But it does not work.

2) I want to make a form for customers, where I can fill in customer info, device info and date when there contract started. Now I want to use SUM to fill in the end date of there contract.

View 3 Replies View Related

Forms :: Cascading Combo Box Based On A Check Box Value

May 6, 2014

On a form I am making, I have two combo boxes. Box 1 has "Title" and Box 2 has "Full Name". In the table associated with FullName, there is a Check Box name "Still Attached".

What I am trying to do when choosing a "Title" in Combo Box 1, I would like only the people with that "Title" and a check in "Still Attached" to be available in the drop down list.

I have tried and I can get combo 2 to filter by title, but not by the "Still Attached" value.

View 11 Replies View Related

Forms :: Check All Records In A Subform Based On CBO Of Main Form

Jun 28, 2015

I have a form with 22 subforms (in about 11 tabs). Each one of these subforms has a controlling field in the main form (table) that dictates if the associated subform needs to comply with data entry rules or not.

For example:
Field in main form cboMed (Yes; No)
Subform: frmSubMeds has a list of medications

I want to be able to loop through all the records of the subform and determine if they are complete.

This check is run from a command button; that should also consider the value in the combo box. i.e. Check only if the combo has a value of "Yes"

Since i have 22 subforms and have to run the check on everyone of them, i have used the tag property to check if the record is blank or not. This is what i have so far

Code:
For Each ctl In Me.Controls
Select Case ctl.Properties("ControlType")
Case acSubform ' only look for subforms
If ctl.Enabled Then
If Not (IsNull(ctl.Properties("SourceObject"))) Then 'if it is a subform type

[Code] ....

The problem with this is that it only looks for the selected record in the subform and doesnt look for ALL the records.

View 5 Replies View Related

Forms :: Enable / Disable Check Boxes Based On Combo Box Selection

Jun 17, 2015

im trying to enable/disable checkboxes based on a combobox selection for instance,

i make the selection in a combo box called terms and conditions. i want it then to only enable the business,domestic and summary check boxes for that type, with the onther check boxes staying disabled. is there a way this can be done through code like the statement "only enable if this letter type selection has been selected"

View 14 Replies View Related

Forms :: Delete Records In Subform Based On Check Box In Parent Form

Mar 1, 2015

I have a parent form and connected to it is a subform. On the parent form I have a checkbox which enables and disables fields on the parent form and also hides the subform.

What I want to do is when the user unchecks the checkbox, this action also deletes the associated subform records, if there are any.I'm sure that this can be done with an SQL Delete query in VBA.

View 5 Replies View Related

Forms :: Label Text Show / Hide Condition With Check Box Value

Jul 24, 2013

I have a report base on my table. Here a check box. I wanna show two label text hide/show base on when check is true or false. It will be when report will be open. I have try this but nothing is happened.

Code:
If AffecteAc= True Then
affected.Visible = True
general.Visible = False
End If

View 1 Replies View Related

Forms :: Update Row-source Of Combobox Based On Value Selected On Another ComboBox?

Apr 26, 2015

I am trying to use a combobox called Manufacturer to select which table the combobox called Model gets it's rowsource from using the code below.

Code:

Private Sub Manufacturer_AfterUpdate()
If (Me.Manufacturer.Value = "Siemens") Then
Me.Model.RowSourceType = "Table/Query"
Me.Model.Recordset = "SeimensTable"
Me.Model.RowSource = "SELECT Model FROM SeimensTable"
Else
If (Me.Manufacturer.Value = "Samsung") Then
Me.Model.RowSourceType = "Table/Query"
Me.Model.Recordset = "SamsungTable"
Me.Model.RowSource = "SELECT Model FROM SamsungTable"
End If
End If
End Sub

But when I run the form and select Manufacturer. Combobox Model remains empty. tell me what I'm doing wrong?

View 5 Replies View Related

Modules & VBA :: Check That No Records Are Selected In A Listbox

Apr 28, 2014

I have button on my form that uses a selected record in a listbox (non multi-select) to run code that updates a table. The code itself works great so long as there is a record selected in the listbox. If no record is selected an error is thrown. I'd prefer the end user not to ever see that error. If the end user clicks the button and no records are selected, I'd like for nothing to happen at all. I've tried several variations of checking the listbox with an if / then statement to see if records are selected and if so to exit sub, but they all throw errors when no record is selected in the listbox.

Code:

If IsNull(Me!lstHeatTreatments) Then
Exit Sub
End If

[Code].....

View 2 Replies View Related

General :: How To Generate Report By Selected Check Box

Feb 4, 2013

I want to modify one report as "I have 3check boxes, when I select one then others should disable and the report I selected should be generate"

So I have to create additional check box. What is the code to create & generate the report by seleted check box.

View 1 Replies View Related

How To Link A Selected Option To Check Boxes

Aug 31, 2015

I have a database where new products are entered into it. Over time there are revisions that are made to these products and to capture this, a drop down box has been added that allows the user inputting the product to select the current revision number of this product.I also have another form which shows the product serial numbers, and then a bunch of fields relating to revision numbers (a check box for each), this can be used by field technicians who can locate older models and tick off a revision when they have updated a product to this specification.

What I am hoping to do is that when the user initially enters in a product and selects the revision number of it, the other form will automatically update (the check boxes) up to and including this revision... so for example if a product is being entered and is up to revision 5 - the check boxes under this serial number on the 'revision' form will all be checked automatically (Revision 1, Revision 2, Revision 3, Revision 4, and Revision 5 check boxes).

View 14 Replies View Related

Requery Form Based On Query

Oct 2, 2005

I have a form that is based on a query, on the form there is an option group with two options (show all and show active). This option group is the criteria for the query the form is based on. My hope was to have a requery on the after update of the option group and have it show approptiate records based on that option group.
My query does work if I open it by itself, and the form will show the appropriate records when it is initially opened. However, when I change options in the option group the query runs again but the data in the form is not changed.
I have searched every forum I know of but I have not found out how to make this work. It is like the form is not being refreshed with the new data from the query.
Lastly, this is my first large database and my knowledge of database design is a little like swiss cheese! Is there a way and would it be better to use a filter to do this? I want the user to just click an option or button to show records marked as active only or show all records. By active I mean the yes no field in the table being set to yes.

View 9 Replies View Related

Forms :: Text Box Based Off Another Text Box

Apr 11, 2014

Is it possible to have the value in a text box be set automatically based on the value in another textbox?For example, Textbox Gender is Male, so Textbox Reference is Male.

Code:

IFF Me.Gender = "Male" Then
Me.Reference = "Male" And
Me.ID = "ea13-02c"
Else If
Me.Gender = "Female"
Me.Reference = "Female" And
Me.ID = "ea13-01c"
End If

View 1 Replies View Related

Forms :: Text Box Value Based On Two Other Textboxes

Oct 12, 2014

I have three textboxes , textbox 1,textbox 2, and textbox 3, I can change the value of textbox 3 based on the date of textbox 2 by using

if me. textbox2 < date then
me. textbox 3 ="expired"
end if

but I need it to look at textbox 1 as well and only change textbox 3 to "expired" if both conditions are true. example

if textbox 1 = "abs" and
textbox 2 < date
then textbox 3 = "expired".
end if

View 10 Replies View Related







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