Forms :: Drop Down Box In A Form To Call A Query
Mar 14, 2013
I want to track which user has which phone and track issues with them.
I have all the relationships set up right.
I have tables:
DeviceStatus - for the drop down box, contains IT Stock, Faulty, With User and Retired
DeviceTypes - Contains model numbers for devices
Assets - Contains a link to DeviceTypes, a link to DeviceStatus and the serial number of a phone.
I have a query:
StockStatus - shows Assets.ID, DeviceStatus.Status, DeviceTypes.description and Assets.SerialNumber
What I want as an end result is a form with a drop down box that shows DeviceStatus.Status (which I have working at the moment) with a go button next to it which will call the query that only shows what was selected in that drop down box.
View Replies
ADVERTISEMENT
Nov 4, 2014
I have three forms - Form1,Form2 and Form3 linked to a navigation form with Navigation buttons. I have separate VBA codes under each Before update event of these forms, Form1,Form2 and Form3 to call a VBA module to track the changes performed by the users(Like an Audit Trail) in specified fields of the forms which will track them to a table.there are control tags in the form properties --> others --> Tag to track the changes in the fields which are defined in the VBA Module.this is the code to call the VBA Module:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.NewRecord Then
Call AuditChanges("UniqueID", "Part No", "NEW")
Else
Call AuditChanges("UniqueID", "Part No", "EDIT")
End If
End Sub
[code]....
The code is working perfect when the forms are run separately.but when they are run from the navigation form by clicking the navigation buttons, the code is not working !!
View 2 Replies
View Related
May 14, 2007
Hi,
I need to build a query where upon form input a different table gets queried.
SELECT *
FROM ((Forms!DCL!PortDropDown))
WHERE ((Forms!DCL!DestinationList=(Reg_Dest.Destination) ));
The "FROM" is my problem. The "WHERE" is working. I am getting a "SYNTAX ERROR IN JOIN OPERATION" error message. Please help.
Thank you:confused:
View 6 Replies
View Related
Oct 26, 2004
Hi! I have a query setup that feeds off of three combo boxes on a form. It is setup to allow a user to search and calculate revenue for a selected time period by company, then department, then page. If all three or just company are selected, there are no issues running the data. However, if only company and department is selected I receive an 'ODBC--Call Failed' message. The issues seems to be stemming from the department field as I can link the department table to the main table and the query will run without error. The problem with that bandaid is that the query takes more than 15 minutes to run that way as opposed to about 2 minutes to pull more data at the company level.
Any suggestions on why this is happening or a fix that can be put in place? Any help is greatly appreciated.
I can provide more details if needed. Thanks!
View 6 Replies
View Related
Aug 7, 2013
When running a query in Access 2013 or 2010 we get an ODBC call failed. However when we run just the form, which the query connects to, it works just fine.
View 3 Replies
View Related
Jan 15, 2014
I have a database with a drop down box that lists all of the contacts in the database. When I select someone in that drop down box it goes directly to their record.
What I want to do is be able to display different criteria in the drop down box based on some criteria. So one criterion might be everyone, another criterion might be only people with a certain product.
How would I do this?
I guess I would like something like, one drop down box selects the criteria (show all clients, or show all clients with a certain product), then another drop down box is based on that one which displays that which was select in the first drop down. Then the results in the form would display based on the second drop down.
View 5 Replies
View Related
May 31, 2013
I have a master form for lack of a better phrase and 3 other forms that represent specific items in the original drop down box. In the master drop down box, I have all 50 states, and the 3 forms are for 3 specific states. Here's the code I have so far but when I save, it says "The 'OpenForm' macro action has an invalid value for the 'Where Condition' agrument."
Option Compare Database
Option Explicit
Private Sub State_AfterUpdate()
Select Case Me.State
Case "CA"
DoCmd.OpenForm "Auditor Form (CA)"
[code]....
View 14 Replies
View Related
Mar 25, 2015
I created a form that has a drop down menu to select a name. I attempted to set it up so that once a name is selected, another form is opened with that person's information. I was able to get it set up so that the first form closes and the second form comes up, but I can't get it to filter the name. I tried using SetTempVar and then SearchForRecord, but got nothing. I tried using OpenForm and Where Condition equals the search, but just got the automation error. It is currently set up using SetTempVer, OpenForm, SearchForRecord.
View 3 Replies
View Related
Sep 4, 2013
I'm having to recode some old MS Access DBs so they will run in the following environments:
Office 2000 on WinXP
Office 2003 on WinXP
Office 2010 on WinXP
Office 2000 on Win7
Office 2003 on Win7
Office 2010 on Win7
When I wrote my code for Office 2000 on WinXP things were simple because directory paths were the same across all computers and I could hard code pathing when using a shell command to launch other files.
My new approach is to make a function call to the Windows registry to determine the default executable and path for opening a file based upon its extension (see apicFindExecutable in basWindows API module).
I'm able to use code to create a shell call and debug print it to the immediate window. If I put my cursor in the immediate window at the end of the shell call and hit [enter] the external file will open as desired. If I try to open the external file directly through code, I get a file not found error.
To recreate the error take the following steps:
(1) browse to files that are accessible from your computer
(2) click the PREPARE DATA AND OPEN MAIL MERGE DOCUMENTS command button
Shell function call is made by the fnOpenFile function located in the basOpenFile module. There has to be a trick here that I'm missing.
View 5 Replies
View Related
May 31, 2006
I'll admit from the start that I'm a newbie at Access 2003 and I've tried looking in the help file and internet searches. But I've become stumped on how to create what I'm looking for.
I would like to create a form that performs a query that has drop down menus with info from each specific column in a table. That way I don't have to necessarily need to know off the top of my head what data is entered in that column, but can click the drop down menu and get all of the data listed in that particular column. Once have a particular set of info selected, then have a button like "submit" and then the query results appear in a form and click through each page or results.
Is this possible?
View 1 Replies
View Related
Jun 20, 2014
I'm a new user of Access and I'm required to input a survey into access. The data collected is being analyzed afterwards and therefore there cannot be any alpha content in the original table so I assigned multiple choice options numbers to correspond to the answers. In form view however I need the drop down boxes to spell out the answers, not just the numbers so the interviewer can read them out, I've seen this done on other similar surveys..I also tried going into form view and editing the drop down choices but that changes the table values.
View 1 Replies
View Related
Sep 15, 2013
I have tab control form with (5) tabs. For this discussion - Tabs 1 through 5. For a blank (new) form sheet tabs 4 & 5 need to be hidden. Based on what is selected via the drop down box (on tab 1) then tabs 4 & 5 may remain hidden or needed to be un-hidden. Example: [DropDown1]
Selection 1: stay hidden
Selection 2: unhide
Selection 3: unhide
Selection 4: stay hidden
Selection 5: unhide
Selection 6: stay hidden
Selection 7: unhide
Selection 8: stay hidden
Selection 9: stay hidden
I think one I figure this out then I can use the 'OnCurrent' event to check the drop down selection as a user selects the a record or scrolls through records.
View 2 Replies
View Related
Mar 12, 2013
I have built a form that holds details of training records. What I want is when a drop down is selected in the main form, that it will populate some of the fields in the subform. I have this working at the moment, that for example, when a certain course is selected, that their modules will appear in the subform. Where my problem arises is that I have a relationship between two tables that I want to appear on the subform, so that details can be filled in on the subform against the list of modules that automatically appear.
View 2 Replies
View Related
Nov 30, 2013
I wish to create a forms that has command button which display a drop down list. The drop down list should contain commands for reports and forms.
Lets assume we have forms named FrmStock, FrmSales and we also have Reports named RptUserLog , RptTurnover.
View 3 Replies
View Related
Aug 6, 2013
I have a simple data entry form with drop down facilities on 2 fields. One of these fields incorporates a drop down list from a table but there are occasions when I wish to make a free text entry for the single record, but do not wish to add it to the drop down list.
I have tried to achieve this with a Combo Box but without success, although I am sure that I have read that it is possible.
View 14 Replies
View Related
May 29, 2015
DLookup function. (this is for a stamp collection database).
On my form ("InventoryInput") I have a text box called "Catalog" for a numeric entry and a text combo box for selecting a "Country" in drop down list.
I want to query a table called "CatNameList" to get the "StampName" of the item (based on the entries of Catalog and Country) and populate that name in the text box. The fields in this table are called "StampName", "CatNumb" & "CName" respectively.
I have successfully placed the following expression in the control source of that textbox and able to populate the StampName I need based solely on the catalog number alone.
That express is :
=DLookUp("StampName", "CatNameList", "CatNumb = Form![Catalog]")
So it will populate the "StampName" data to match the "Catalog" number entry just fine.
However, I need to add a second layer to incorporate the Country.
Example : There is a catalog "1" for "USA", and a catalog "1" for "Canada" but both have different "StampName".
I have been attempting to get that second piece added with no success. Here is the expression I have been trying to get to work :
=DLookUp("StampName", "CatNameList", "[CatNumb] = " & [Catalog] & " And CName = '" & [Country] & "'")
Right now, the text box is just blank with the above expression. I thought it may be because there was no match found, but I have triple checked to ensure I have the spelling correct on the country name in both places.
Basically, I just need the dlookup to take the "catalog" and "country" off the form and match it to the "CatNameList" table fields of "CatNumb" and "CName" to give me "StampName" field back on the form.
View 4 Replies
View Related
Jul 22, 2014
I have a form (DropDown form) that has 3 drop down fields, you select your values from the drop downs and you would push a command button that runs an event procedure which runs a query (DropDown qry test). The user should have the option of picking any combination of fields to filter by. Or no combination, which would return all values in all fields. So I am basically using the form as parameter's for the query.
The problem I'm having is that my query is returning values for one field AND values for another field. Even if the other values selected are not in the same record. It's not combining the fields together to filter. For example: you pick a Project name and Supplier name, the query will return records that have the project name you selected but it will also return records with the supplier name you selected that have a different project name.
I've attached screen shots of the form and the design view of the query (the screen shot cut off the last column name. It is meant to say "Expr3: [Forms]![DropDown form]![Combo7]").
Using Windows 7,
Access 2010
Is there a way to select multiple values from the drop downs?
View 14 Replies
View Related
May 29, 2015
Having problems getting dlookup to work in the control source field of a text box.
My form has fields : Catalog # (numeric value) and Country (drop down text selection).
I would like to query a table CatNameList for a name (text) if the catalog # and country find a match on the table.
My field names on the CatNameList table are : Name, Number (to validate against the Catalog # entered on the form) and CName (to validate against the Country drop down on the form).
I am successfully able to populate the name from the CatNameList table on my form using lookup of the catalog # using this :
=DLookUp("Name","CatNameList","Number = Form![Catalog #]")
However, I will eventually have several catalog numbers that will be identical in the table CatNameList, thus why the country is important as the second criteria to be added into the dlookup.
I have tried for a few hours unsuccessfully to add the second portion to my dlookup.
This is what I have currently (not working) that I have been playing with, I'm sure I'm missing a quote mark, & or something simple.
=DLookUp("Name", "CatNameList", "Number = Form![Catalog #] And CName = ‘”& Form![Country] & ”’”)
View 14 Replies
View Related
Apr 5, 2014
I have the following in Form and it works OK
Call RunForm("frmProviderLookup", "", "Edit", "", "", "Normal", "Normal")
I want to build a combo box with several different RunForm variations as follows:
RunForm("frmProviderLookup", "", "Edit", "", "", "Normal", "Normal")
RunForm("frmCustomerLookup", "", "Edit", "", "", "Normal", "Normal")
RunForm("frmVendorLookup", "", "Edit", "", "", "Normal", "Normal")
etc, there are many of these
When I select one the variations from the combo box the RunForm statement is stored in strAction varaible..How do I code the Call strAction line? (I want only one call statement).In other words how to call a Function from a variable...The start of my module Function works OK and looks like this:
Public Function RunForm(FormName As String, _
Optional WhereCondition As String = "", _
Optional xMode As String = "", _
Optional filterName As String = "", _
Optional Args As String = "", _
Optional WindowMode As String = "", _
Optional View As String = "")
' Parameters (all optional except parameter 1)
' 1 - Form Name
' 2 - Where condition
' 3 - Mode [Add, Edit, View(Read Only), ""(PropertySettings), DS(Datasheet Edit)]
' 4 - Filter Name
' 5 - Opening Arguments
' 6 - Window Mode
' 7 - Form View
View 1 Replies
View Related
Mar 12, 2013
I have a call log database that is used to log calls (Obviously), i have several users over a network and everything works great, but i have been asked to create an alert function that notifies the user when a new call is logged assigned to them by a different user, similar to outlook when a new email is received.
I was planning on having a timer even which checks for new calls every few mins or so and opens up a form to display the new calls which have not been dealt with i thought it was gonna be simple but i have come across a few problems.
1. verifying if a new call has been logged
2. displaying only new calls
3. only displaying alert once per new call
I have attached the database but have had to remove all information from the tables for security reasons.
View 3 Replies
View Related
Aug 30, 2006
Hi,
Is it possible to call a procedure that exists in one form on another form please?
Regards,
B
View 13 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.
See attachment ....
View 3 Replies
View Related
Feb 22, 2005
What code would i use to say:
on click
goto the form "datalookup" (which is already open)
and run command "cmdupdate_click" (which is a private sub on that form).
do i have to change it to a public sub? or can i just run it? what code would i use?
View 1 Replies
View Related
Feb 6, 2006
Hello everyone!I need to call the button_click procedure for a button on a form (button1), from another form, if you see what I mean!.Basically the user opens form1. They click a button which opens form2. Once they have finished on form2 they press the close button, which is the point where I need to call the button1_click procedure on form1.I imagine it's something like this:Call Forms![frmForm1]![button1]![Click] orCall Forms.[frmForm1].[button1_Click()]But no matter what syntax I try it just won't work! They're very basic forms, with only 2 buttons on and basic commands.Any help appreciated! Thanks
View 5 Replies
View Related
Aug 8, 2006
Is it possible to call a function from a field on a form, ie, in the
control source put = FunctionName(abc)? Then I want to concantenate
it to another variable so it would look like:
=FunctionName(abc) & TextVariable
I tried this and got the ?Name on the form, like it couldn't find the field
name, which is really a function I'm calling.
Is this possible and if so, what am I doing wrong?
Thanks in advance for any help.
View 1 Replies
View Related
Jul 29, 2005
i have a sample function
Function GetPercent(n As Integer) As Integer
Select Case n
Case 1: GetPercent = 100
Case 2: GetPercent = 50
Case 3: GetPercent = 0
End Select
End Function
I have a table like this
a | b | c | d | e | f | percent
----------------------------------------
1 | 2 | 1 | 3 | 3 | 1
3 | 1 | 3 | 2 | 1 | 3
1 | 2 | 1 | 1 | 2 | 1
2 | 2 | 3 | 3 | 1 | 2
1 | 1 | 1 | 2 | 2 | 3
1 = 100
2 = 50
3 = 0
for example the first row
1 | 2 | 1 | 3 | 3 | 1
(100+50+100+0+0+100) / 6
I think if I can call function from query than I write like it:
strSQL = "update table set percent = " & GetPercent(a) + GetPercent(b)
CurrentDb.Execute (strSQL)
but sure that I got an error because its not find the a and b
how can I do it?
good day!
View 1 Replies
View Related