Forms :: Filter Table In Background Using Text Box Called Badge
Jul 10, 2014
I have a continuous form... and I want to filter the table in the background using the text box called "Badge" (boxed in red in my picture.) You can see the corresponding part over in the filter field. When I display the form, though, Access still asks me for the Badge value, so it's not linking. What formatting am I missing to properly refer to the field?
View Replies
ADVERTISEMENT
Jul 13, 2013
In Access 2007 (or 2010 , 2013), in a continuous form, I want to change the background colour of a text box depending on its value. Obviously, for each record, the color can be different.
View 1 Replies
View Related
Oct 19, 2005
:eek: :eek: :eek: :eek: :eek: :confused: :confused: :confused:
I am trying to update a database table via a command button on the main form, that uses tabbed sub forms.
The database gets its data from paradox data tables copied our company's
third-party software. These table files are copied from one location to another to stop the paradox database from locking up and giving me errors during the import process of this database. I then link to these files at a pre-determined location on a local computer hard drive.
When I try to run the code below I get the error about the table being
locked by a user or process. As you can see I have tried adding a pause
incase the files are still being copied but this does not seem to be the
problem.
I have used a msg box to confirm that the copying process has completed before starting the make query, but the same error comes up after I click ok.
Can anyone suggest anything else.
As you can see from the simplicity of the code below I am a beginner so take it easy on me, by not taking knowledge for granted. :)
code:
------------------------------------------------------------
Dim response
Dim stDocName As String
Dim stLinkCriteria As String
response = MsgBox("Are you sure that you want to update xxx with Customer
data from xxx?", vbYesNo, "Perform Update")
If response = vbYes Then
‘pause software to let any pending work to be completed
Sleep (5000)
‘close active form
DoCmd.Close
‘close all active forms
Do While Forms.Count > 0
DoCmd.Close acForm, Forms(0).Name
Loop
‘pause software to let any pending work to be completed
Sleep (30000)
‘delete existing file
Kill "c:folderfile DATA.DB"
‘replace with new file
FileCopy "J:Folderew_DATA.DB", " c:folderfile DATA.DB "
‘pause software to let any pending work to be completed
Sleep (40000)
DoCmd.SetWarnings False
stDocName = "Make_DATA"
DoCmd.OpenQuery stDocName, acNormal, acEdit
‘pause software to let any pending work to be completed
Sleep (35000)
stDocName = "Make_DATA_SUMMARY"
DoCmd.OpenQuery stDocName, acNormal, acEdit
‘pause software to let any pending work to be completed
Sleep (35000)
stDocName = "qry_Update_ Status"
DoCmd.OpenQuery stDocName, acNormal, acEdit
‘pause software to let any pending work to be completed
Sleep (35000)
‘open up main form when finsihed
stDocName = "main-form"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.SetWarnings True
Else
End If
View 3 Replies
View Related
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
Oct 17, 2013
I've created a macro to use an unbound textbox to filter a form. In a query, I combined 3 fields to enable an easy search over. Sadly, only text characters work for the search, so whenever I search for numeric values, it returns null. This doesn't happen if I utilise the filter over just a numeric field - only when the search field combined multiple fields.
Is there a simple solution? My marco filter is
Code:
[Forms]![STAFF SEARCH FORM]![SEARCHDATA] Like "*" & "[SEARCHFIELD]" & "*"
View 1 Replies
View Related
Jun 9, 2015
I have a Menu form that has 5 cmdbuttons that opens the same main forms but with 5 different filters. I want a label or text box to change to the name of the filter. I am using VBA to open the form. I can't code a form that's not open yet. Is there any way to accomplished the above?
View 14 Replies
View Related
May 23, 2013
I have researched but couldn't find any working filter criteria for subform criteria.i have used the code, searching the web but still no luck.I have attached the picture and sample northwind database (accdb). I just want to filter customers in Orders navigation using text criteria.
View 9 Replies
View Related
Aug 26, 2003
I need to change the background colour of a text box after a change to the field has been made?
ie.
Make: IBM (Background Color Grey - Default)
User makes a change to Make ..
Make: Toshiba - (Background Color changes to Yellow )
I'm trying to code this with the OnChange option on the TextBox but can't see to find the right code.
I was using Application.SetOption"Background", colour value with no success
View 2 Replies
View Related
Aug 6, 2013
I have a form with two combo boxes. The first box lists switch names from a query, and the second lists switchports from another query. The switchport query lists all the switchports for whatever switch is selected in the Switch Name combo box, and all the settings for that port (one column per setting). I want each text box to display the corresponding data from the switchport query for the switch selected in the first combo box and the switchport selected in the second combo box.
View 3 Replies
View Related
Mar 8, 2014
In a nutshell, I have a form where the 'Record Source' is a table titled 't_02_0_Assets'. I have several fields in the table that have foreign key references that utilize the Lookup Combo Box display control to allow users to select from a drop down list in the form.
The issue I am having is that I can't filter the text in the foreign key fields (only the ID's ).
My attempted solution was to create a control on the form (text box) and bind it to each of the foreign key ID's using the DLookUp function and then reference this control in the filter code.
My question is... how do I reference this DLookUp textbox in my filter VbCode?
I have attached a '.jpg' image of various aspects of the form including the filter code on the 'On Change' event.
View 1 Replies
View Related
Aug 2, 2015
I am using an apply filter in a form to find records in a split form.
The macro which I am using is:
[SLIDE] Like "*" & [Forms]![SALES]![ENTERREFDATA] & "*"
However I the filter to return only records which match the text exactly.
View 2 Replies
View Related
Mar 22, 2013
I am trying to filter a form by using two unbound text boxes that a user can enter in their criteria and then clicking a command button to filter the form using the criteria entered into the text boxes. My fields are as follows:
Bound Field: MondayD1
Unbound text box: txtMonday
Bound Field: SundayD7
Unbound text box: txtSunday
Command Button: cmdSelect
MondayD1 = txtMonday
SundayD7 = txtSunday
I have looked up several options using vb for the on click event of the command button but I either get an error message or the form shows up blank.
View 2 Replies
View Related
Oct 27, 2013
I wanted to build a dynamic search form using text box instead of the common combo box type.
I found an example that used the combo box and the searching portion of the code is as followed:
Code:
If Nz(Me.txtID, "") > "" Then
If Len(Nz(strFilter)) > 0 Then strFilter = strFilter & " And "
strFilter = strFilter & "CategoryID = '" & Me.txtID & "'"
bFilter = True
End If
How to insert (Like "*" & Me.txtID & "*") into the code to make the dynamic search using text box possible.
View 1 Replies
View Related
Sep 8, 2013
How do I change the background colors and text formatting in all of the reports in one database at the same time? If this is not possible, is there an easier way to change the report formatting without going through every report?
View 2 Replies
View Related
Nov 14, 2014
I have a lost/found property database form (soft-copy), it works perfectly fine. We enter the details of the found property and then take the print (hard-copy) of the form. Whenever an owner comes to claim his/her item we search through our soft-copy for the specific item/record and then ask them to sign on the relevant hard-copy record after which we cross out the hard-copy and write with a permanent marker "Restored". Whereas in the soft-copy we type in the details that it has been claimed/restored in available text fields. However, is there anyway that I can display a big large banner saying "restored" in front of only that record(s) where item(s) has been restored to the owner. It doesn't have to be a text banner/label, it could also be a picture saying "Restored". I have manage to get a print message box set-up for this but it's too annoying. Every time we pull out an item's record that has been restored, that message box comes up and then we have to click OK to proceed. I can remove it but only if can find a replacement.
View 2 Replies
View Related
Jan 8, 2015
So what I have created is a form with 4 combo boxes which filters a subform with a click button by running a sql query.It was working great yesterday but then when I made the subform a pass through query it seems to no longer run (or just runs so slow it takes a large amount of time to query). To get a better sense of what I'm talking about I basically have a button and inside of the button it takes this query template:
SQL = "SELECT * FROM queryname WHERE 1=1"
concats with if statements to the end of the Where clause with the values in the combo box and then sets
subFormName.Form.RecordSource = SQL
how I can get this table to query...Also, for my second question, is it possible to make this pass through table editable after I filter it?
View 1 Replies
View Related
Apr 3, 2014
I use Me.Filter & Me.Filteron to filter the data from the table to display in the form, i used this in On Open event & This is working fine.
But in the filtered form when the user right click and filter some value and unfilter the search (in the bottom of the form next to search (Navigation Button) ) then this shows all the data from the table i.e its not taking the on open filter condition.
View 3 Replies
View Related
May 10, 2013
I have a form that is based on a linked table of students eligible to complete a online survey. Within that form, I have a sub form (based on another linked table) of students who have completed the form and at what date and time.
Only about 1 in 10 eligible students complete the form.
I'd like to filter by students who have completed the form, and sort by date submitted.
So I have the main form called "students" and the subform with the date submitted is called "New - BasicInfo subform" and they are linked by student ID. The date submitted field in the subform is formatted like "5/6/2013 3:07:32 PM".
I've tried adding this to me "filter" field in the STudents form properties:
Between [Students]![New - BasicInfo subform]![05/06/2013] AND [Students]![New - BasicInfo subform]![10/01/2013]
No luck, I get syntax error missing operator.
View 1 Replies
View Related
Jan 25, 2015
I'm working on a table for work which will serve as a database of bins and the products currently in those bins, as follows:
ID Bin Amt Product
1 34 25 110001
2 33 15 200005
3 32 23 110003
etc.
Basically: employee A will use a form to update "Bin 34" (ID=1), with information (Amt, Product) until it is emptied by employee B and cleared using a separate form. No new records will be made or deleted, just the adjacent fields (Amt, Product) cleared and filled in and cleared again over and over.
What I'm trying to figure out is, when employee A clicks on the combo box on his/her form to select a Bin and enter information, how can I filter what is listed in the combo box to display only those bins which have no values under Amt & Product. The real-world risk of overwriting a bins fields before it has been cleared by employee B (who physically empties the bin) can be extremely high monetarily so I am trying to reduce that risk by eliminating it from the combo box until employee B has cleared those fields.
View 1 Replies
View Related
Nov 16, 2013
I am making a specialty form where it must toggle on or off when the user clicks on a boxed area. Since toggle backgrounds cannot be set to transparent, I need to do it some other way. I thought of either using a button to control a hidden checkbox, or just writing code altogether. The problem is that I don't know what code to use to programmatically change the state each time the box is clicked.
View 14 Replies
View Related
Apr 30, 2014
I have a button that opens a second form and filters that form based on a text box on the first form(which remains open). the problem is that it does not filter the second form unless the second form is already loaded for some reason.
For example if i click on the button it opens the form Unfiltered then i go back to the previous form without closing the first form, click the button again and it is then filtered .
I attached the screen shot of the macro for the button and there are no other events on the second form.
View 5 Replies
View Related
Jan 7, 2015
So what I've basically got here is a form with 4 combo boxes and a button that when clicked will filter the results of a table (which is a subform/subreport) based on the values inside the combo boxes. So the problem I have is that when I open up the form it displays a fully filled table but I just want to display the row names and a blank table until the filter button is pressed.
View 2 Replies
View Related
Aug 1, 2005
I'm wanting to get a very, very pale shade of gray as the background colour for an Access form, as well as for several text boxes on it. This is so that users can distinguish editable regions (white bgs) from uneditable ones (light gray bgs).
The default colours that pop up in the menu choices are too dark for this. I've tried using a tiled image for the background of the form, which works fine. But I'd like my uneditable textboxes to be selectable (so users can copy data) whilst being that colour too, which can't be done.
Therefore I'm looking for either the number code for a very very light gray colour (Access' default lightest is "12632256") or some sort of translator tool to let me know how on earth these numbers relate to anything in computing -- I mean, what do those numbers represent? Are they html=no, hex codes=no, rgb values, no... I mean, how is Access coming up with those numbers? I've tried just getting a light gray using trial and error and can't figure it out (even ended up with lime green at one point - very nice on the eyes lol).
Anyone shed some light on this? :rolleyes: :D
View 3 Replies
View Related
Jun 16, 2014
Here, what I am trying to learn, that background of the form change its colour automatically after sometime let say 1 min or after 2 min
I find the link on the web where more than 500 colour code are available, but not sure, how I can use [URL] ....
I can put this command on form_load()
Me.Detail.BackColor = ?????????
but question is how i can bring other colour into loop
Plus, if the user want to do any work on the same form, will this loop also allow the user to do any work, I mean form should not be stuck up in the loop of changing a colour...
View 1 Replies
View Related
Feb 5, 2014
I would like to have a Positive value with a green Background and a Negative Value with a Pink Background.
View 3 Replies
View Related
Oct 3, 2013
I have a question related to a textbox on a form.
In my table (tbl_data) I have a field named Rating. This can be anything from 1 - 10.
On my form (frm_input) I have a textbox (created using the wizard so at the moment I'll call it txt_Rating).
What I would like to know how to do is:
If the value in the textbox is 0-5 leave the background colour of the textbox white with black font.
If the value in the textbox is 6-7 turn the background colour pale yellow with black font.
If the value in the textbox is greater than 7.1 turn the background colour Red with white font.
View 3 Replies
View Related