Form Field To Feed Query
Apr 21, 2005
Simple set up,
I have a Sub form titled Training that has the the following two fields:
[Department],[Jobs]
The jobs is a pull down select box that contains all of the job titles for the entire plant. What i would like to happen is for the user to be forced to select the appropriate department first and then use the [Department] selected to feed the criteria to the query that the [Jobs] field is located in.
In addition i have been un-able to get the fields to be locked until the [Department] field is entered.
I have tried the following unsuccessfully:
Jobs Query Criteria:
=[Foms]![Training]![Department]
View Replies
ADVERTISEMENT
Feb 26, 2014
I am using a public function to feed a variable string to a query. So far I have got:
Code:
Public Function ClientStreetModule(firstLVar As Variant, streetVar As Variant, newFL As Variant) As String
Dim cslStr1 As String, newStreet As String
newStreet = Right(streetVar, Len(streetVar) - Len(newFL))
[code]....
However, I only need to use newStreet as the true part of iif, in which instance all are longer. At least I think this is the problem. I realise I might need to use NZ but am not sure how. Why it is evaluating and giving errors for all records and not just when the iif criteria is true as I want it to?
View 7 Replies
View Related
Nov 8, 2006
Last monday's [Feed Inv]+ this weeks [Feed Del] - this weeks [Feed Inv]= Feed Consumed
Table:
Autonumber (is PK)
Date
Farm
Barn
Lbs Del (pounds delivered)
Lbs Inv (pounds inventoried, this is a physical inventory done at farm)
I can use Between[Start Date] And [End Date] in the criteria to show this weeks Lbs Del and Lbs Inv in a query, no problem.
How do I tell the query or report to subtract 7 from the Start Date to pull last weeks feed inventory?
The result will be displayed in a report, so calculating in a report would be ideal.
Thanks,
SM
View 3 Replies
View Related
Dec 31, 2006
Dim f As Form
Dim g As Form
Set f = Forms!frmInputBox
Set g = Forms!frmCalendar
g("Text" & f!InputDay) = f!InputText & vbCrLf& & f!InputText2
e.g: InputText is 123, InputText2 is abc
I wanted to display the text inside textbox of frmCalendar as:
123
abc
instead of 123abc. how shall i use the vbCrLf?
View 9 Replies
View Related
Nov 9, 2006
Hey guys,
I searched the forums and couldnt find anything that directly related to my issue. What I am trying to do is export a fixed-width text file, but the issue is that the file has to be line feed only. By default Acces creates CR/LF and the client's import specification only allows for Line feed.
I am currently using a macro, with export specification, to create the file. Due to time constraints and other obligations, I am really trying to avoid VBA programming.
Thanks in advance,
Jahaines
View 3 Replies
View Related
Jul 28, 2014
I've built an HTML web form that sends an email to me upon submission with all the field inputs. I have previously found success using VBA in Outlook to parse out these emails and feed the substrings into an Excel Sheet (hooray!), but now am looking to feed the substrings into Access, specifically into a table in an existing .mdb file. I figure the way Outlook will "talk to" Access will likely be a bit different from the way it does for Excel.
The way my previous script engaged with Excel was through a rule; every time a new email was received, the following script would run if the message had the subject line generated by my web form. The script would check whether Excel and the target workbook/sheet was open, act accordingly, and then input the substrings (I've excluded that part below), then return Excel and the wb/ws to their initial state. I imagine though, that with Access I might be able to feed the substrings into the .mdb without having to open it proper, the way a front-end talks to a back-end. But perhaps I'm mistaken on that front.
Code:
Option Explicit
Option Compare Text
Public Const xlUp As Integer = -4162 'I genuinely do not know what this is _
about. It came with the initial _
borrowed code.
Public Const wbPath As String = "C:...Workbook.xlsx" 'Workbook path
[Code] .....
View 10 Replies
View Related
May 5, 2014
Any way to insert a half-line feed into text in a control?
View 2 Replies
View Related
May 1, 2015
I have to count the number of occurrences of Line feed (vbLf) in a long string. The code I am using is:
MAX = TLine.Split(vbLf).Length - 1
It does not work.
View 5 Replies
View Related
Apr 25, 2013
I have 3 peices of data that I am working with: Group number, plans and benefit elections. On my form I have fields for the group number and plan and 2 queries. When I enter a group number the first query displays a list of plan descriptions for that group. From there I can enter the plan description into the form's plan field and that runs the second query to give me a list of valid elections for that plan. This all works fine but I want to make the plan selection a little less tedious. What I would like is to be able to double click the query field housing the plan description and have it copied to the form's plan field. I could use the ID instead of the plan description but I work in a production environment and very key stroke counts so I would really like to have a simple double click process.
Is this even possible? If so how would I set that up? I tried using the double click on event macro builder but it does not seem to have this kind of option.
My form contains fields for group number and Plan. The same form houses 2 querys, one that pulls plans based on the group number and the other to pull elections based on the plan field (not the plan query). Would like to double click a plan within the plan query and have that description populated into the form's plan field.
View 6 Replies
View Related
Aug 17, 2006
I have sequence field in query and want it show in form.
Please help me. Thanks
View 1 Replies
View Related
Dec 12, 2013
I have a Form that has a subform and in that there is a subform that runs a query. I need to take the value of in one of the fields returned in that query and transfer it to a field in my original subform.
View 4 Replies
View Related
Nov 22, 2005
I have a list box in a form that controls the query results which will display a name when a certain region is selected. I would like for this to be incorporated into my form so when the user selects the Eastern region for example, John Smith will automatically be returned in the filed on the form since he is the person corresponding to this region. What is the best way to do this and also have the query filed linked to the same table my form is linked with? Thanks.
View 4 Replies
View Related
Mar 8, 2006
Any help or advice on what to search on would be appreciated please
I have a table with the stocklevels of all my shops Fields (PLU, Stocklevel_1 to StockLevel_6..)
Currently I have a form with 3 category levels which set the criteria in a query so I can gereate a list of 50 random PLU's as long as the query already has which Stocklevel to look at (ps the stocklevels table is linked to the Stock details stable via the PLU field)
Rather than creating multiple queries can I include another combo box or a option group with a list of branches which will set which field to get info from? Any suggestions on how this is done?
Thanks:confused:
View 7 Replies
View Related
Jun 21, 2005
:confused: I've tried everything I can possibly think of to get this to work. I've also looked at other threads and I still couldn't get this to work. The code for the list box in my form is Forms!Display_Engineering_Jobs_Report_Inputs!Repor t_Column1. I am trying to set the value in this list box as the input for the field on my query. This value also corresponds to a heading within a table I have. The information under the heading in this table is what I am trying to show in the query. Please help! Also, I'm pretty new to Access, so explain it as if you were writing a page in "Access for Dummies." Thanks!
View 9 Replies
View Related
Jul 24, 2005
Hi,
My situation is hard to explain but i will give it a shot. What i have is a db with employees and its being used to track training sessions. These employees are split into 6 teams and those teams are split into 7 teams each.
I have written two queries, first asks the user what team to display. This data is used in the second query. The second query asks for what training item we are searching for. The result of the 2nd query is displayed in a form. Displaying of the information on a form is important. This way the user can verify that the members on this list are the ones he is updating. Now I wrote a third query that works off of the 2nd and updates the datecompleted field with todays date.
Problem is when i post a button on the form to show all these employees complete it referes back to the first query and asks all the filtering questions again.
I would like to know if there is any way to run an update query from a form that has already been filtered. Or if there is a way to reference these records in a new query so as to avoid all the filtereing again
hope i explained it well
Thanks
Ricky
View 7 Replies
View Related
Aug 20, 2005
I have been looking at some of the solutions to the running sum problem.
The queries I use cannot use the primary key as there are gaps as some filtering has been done with an unmatched query to give me my sample dataset.
From this dataset I have a list of courses and the number of learning hours per each course. This is the field I would like to perform the running sum on.
Its a parameter query and the intention is to email the query the the various schools so no form was necessary.
The solution on microsofts web site wants me to use a form and I dont understand how it works anyway.
Is there a code solution that can use a recordset that doesnt rely on forms?
At present I am reliant on the date which does work but not where a student does two courses on the same day. The forums advice was to use the autonumber but there are gaps in that so that doesnt work. can I generate an autonumber on the fly as an expression and use that in the sub query method?
Fields:
[Date][Person Id][Course Code]
[Course Name][GLH][Running Total][UpliftCode]
[50%][Rule Broken]
what I have so far:
SELECT Pro.Date, Pro.[Person Id], Pro.[Course Code], Pro.[Course Name], Pro.GLH, (Select Sum(Pro1.[GLH]) FROM [QryAllEnrolmentsWithoutMatchingQryWithdrawls] Pro1 WHERE Pro1.[Date]<=Pro.[Date]) AS [Running Total], Pro.UpliftCode, [Running Total]/2 AS [50%], IIf([UpliftCode]="99","No",IIf([GLH]>[50%],"N","Y")) AS [Rule Broken]
FROM QryAllEnrolmentsWithoutMatchingQryWithdrawls AS Pro
ORDER BY Pro.Date;
kind regards in advance
View 1 Replies
View Related
Mar 10, 2006
Hey All,
I have a question regarding referencing a form using dates between.
Currently I have it setup as:
Between [Start Date] And [End Date]
on the query.
I want to reference a form, which i figured would be like this
Between [Forms]![frmSBReports]![txtStartDate] And [Forms]![frmSBReports]![txtEndDate]
But this doesnt work! :confused: What did I do wrong here? Any help as always is greatly appreciated!
Thanks!
Mateo
View 1 Replies
View Related
Mar 6, 2005
I have created a form from a query. I have then at a later date added a new field to the query. I have returned to the form and attempted to add it to the form but it doesn't show the new field within the control source options. Does anyone know why? Do I really have to start all over again with my form?
Thanks
Just1
View 3 Replies
View Related
Jul 17, 2005
Hi All
Ok I have a simple problem. I want to entry value of a field as criteria of a query. Ie. I have a field on a form which is EmplyeeCategores. It's simple to use this as a a filter in a query by simply putting Forms![frmMailer2]![EmployeeCategories] in the criteria of the EmployeeCategories column in the query if there was only 1 criteria.
What I mean is, if the value of the field in form was A1 for example, it'll work and the query will bring up all emplyees who are categorised as A1. But I want users to be able to put multiple codes in the form, such as A1 or A2 or C4, and the query to bring up all the employees that fit into all 3 of these categories,
I hope this makes sense. Any help will be much appreciated.
Many thanks
Oz
View 3 Replies
View Related
Dec 1, 2005
How can I get my form filed to return the results of a query that I have? For example I have my query set to use the month and year that are in my form in a cbo to get the desired results for Balance Growth. I want this Balance Growth result to show in my form field after the year is updated in my cbo. Right now in my Balance growth field on my form I have it linked to the query but it has the #Name? in it. Thanks for any help.
View 2 Replies
View Related
Dec 9, 2005
I have a form that is linked to a table. I would like to have a field on my form that has a control source of a query I have. There are cbos on my form that control the output of the query so I would like for the query to run after all 3 cbos have the data selected and then this form field linked to the query to update. The 2 problems are:
1. How to link this field to the query
2. How to get this field to update after the cbos have been selected.
View 1 Replies
View Related
Aug 5, 2006
Is the a way of changing the fields selected in a query by a form.
I have a form showing how many people need to do each module. Each textbox is populuted by a count from the table.
The idea is simply to avoid having 26 queries based on each module. Is there a way to have the field name changed via the form.
I have used the on dbl click event to pass the field name to a hidden field on the record. I just need to pass the data in the hidden field to the select query.
View 2 Replies
View Related
Aug 19, 2013
I want to make a query([query1]) based on a table([table1]) and a field from the [form1] then I want to make another field in [form1] and bound it to [query1] all the fields are number (and double in [table1])
View 1 Replies
View Related
Jul 11, 2012
Can a form change the field on a query?
Right now one of the tables in my query has multiple years across the top (as the fields), 2010, 2011, 2012, 2013. Each year contains different rates that get applied to labor hours.
I would like to know if there is a way to have a form change the field in my query. I have attached a word document showing print screens of what I mean.
View 1 Replies
View Related
Apr 26, 2006
I tried to word the title as accurately as possible.
What I'm trying to build is a Form where they can select data in different fields to limit (filter) the list. In my query criteria I want to read the form, if there's a value use THAT in the criteria (for that field) otherwise ignore it.
I've tried isnulls etc. If I put a value (like City) it properly returns all the records with that city, however if I put nothing the "ISNULL" returns a value that the criteria doesn't match i.e. I get nothing.
There must be a way to tell a query to NOT use any criteria if an object (form!field) is blank...?
View 2 Replies
View Related
Nov 8, 2006
Hello,
I am running a append query from a button.
In the query, I have set the OrderID criteria to:
[Forms]![sfrmOrders]![txtOrderID]
Whenever I try to run the query from the open form & subform, an Access 'Enter Parameter Value' window pops up.
I would like to use this Criteria for many different features in my db (SendObject, etc.), but I cannot find how to set the OrderID based on the current form.
If anyone can see what I am doing wrong, I would appreciate your help!
Thanks!
View 9 Replies
View Related