I created a query that pulls from multiple tables, of which contain the same field name (LastAccessed).
I am getting an error stating that (LastAccessed) "...could refer to more that one table listed...".
What is the correct way to state that I want to pull (LastAccessed) from 'tbldatabases' and not the others.
My goal is to only pulls those record whose (LastAccessed) contains 2004. Right now I have "Year([LastAccessed])"
in the field line and "2004" as its criteria.
Hi, I have a problem I'm trying to solve using an expression in a query
So far I have a working expression giving me the result I want. Simply it's:
subtotal: ([ChargeA])+([ChargeB])+([ChargeC]) etc. etc.
However, I also have to apply an effective 'Cap' which I'm calling a 'Full Load Charge'.
Whenever a subtotal exceeds the full load charge I need to cap it so that our customer doesn't get over-charged. This full load charge is agreed with our customers.
Let's say for example that the subtotal for hauling goods from a supplier is £600 for a total of 20 pallets but the Full Load Charge has been agreed at £400.
How can I build an expression that will use the subtotal calculated until it reaches the full load charge limit and then use the agreed full load charge?
The expression might read something like... 'fullLoadChgCap: If 'subTotal' is less than or equal to 'fullLoadCharge' use 'subTotal' else use 'fullLoadCharge'
I don't know how to write this as an expression :o .
I'm sure this is a very obvious question for someone, but not so much for myself. I just need a date range formula for a query. I want the query to ask me the start date and also ask the end date and pull up all dates falling in between.
Hello, I have a date field in my form that I would like to have the date change color sixty days prior to the date entered. Can someone give me the expression to use in conditional formatting? For example: If the date is 9/30/05, I would like it to change color on 8/2/05.
I need to write an expession in the Expression Builder but I cant seem to get it correct. Here is what I want to do:
I have 2 forms and 1 query.
I want the criteria for my query to take the data from the loaded form, ie if form1 is loaded then take the value in field1/form1 as criteria, otherwise, if form2 is loaded then take the value in field2/form2 as criteria.
Form1 and form2 are never loaded at the same time.
Can someone give me a suggestion? Thanx for your help
I hope someone can help me, I have a database compiled from different sources which means that information in fields that need to be linked are written differently, meaning that I can't just simply make a relationship between them.
The two tables I would like to link are, Table 1 has the fields OCCUPATION and AMOUNT and contains over 740,000 records. Table 2 has the fields COMPANY_NAME and TICKER and has 500 records.
I need to find a way for all COMPANY_NAME fields in table 2 to be cross-referenced with the OCCUPATION field, so if COMPANY_NAME is part of the string in the OCCUPATION field then the TICKER (of that company) can be attached to the record in table 1 (specifically to AMOUNT).
The problem is that the OCCUPATION field is not written in a standard form and can include either only the occupation, only the company name, or both in either order.
I can make a seperate query for each company by using as criteria "like "*[COMPANY_NAME]*", but then I would have to do this 500 times!!! Is there a way to automate this?
The final purpose is to link the AMOUNT to TICKER so as to find the sum of all the amount associated with a company.
I really hope you can help, I have little programming knowledge and it will save me the time of making 500 seperate queries. The final use is for my thesis studying private contributions in the american elections.
ok, let me please ask this question regarding a payment relationship in my database
it will be paid in four ways, cash, creditcard, cheque, paypal
each of these payment types will have their own features..
eg creditcard (name on card, card number)
cheque (cheque date, date cleared)
paypal (username...YOU GET THE PICTURE
so is this below way a good way to store these details, or can i do it with 4 less tables..
http://bb.1asphost.com/antonyx6/untitled2.jpg
if this way is correct, i dont see how each id will be entered.. eg if i enter some cheque details.. will that lead the chequeid to be linked to the paymentid, and the paymentid to the bookingid, and the bookingid to the booking details etc
I'm looking for advice on the best method to accomplish the following from the esteemed members of this Forum (You all have provided excellent advice in the past to this Access Dummy, with my thanks), (I've also searched the forums without result):
I would like to make several fields "required" fields on my form, easy enough, in that I set the Required property on the table to "Yes".
What I would like to happen on the form is that when a user tabs out of a required field, a message box pops up that says "This is a required field" and/or when they click any of the following command buttons I've created, "Save Record", "New Record" or "Close Form", that a message box pop up and list the required fields that they missed.
Any ideas, with code, macros, or other solutions would be greatly appreciated, keeping in mind that I'm just not that swift to start with.
I have a form set up where user's type in an explanation of how a claim is being appealed and resolved in a memo field.
One problem, for some reason management doesn't want these explanations to end with a period. But the users keep ignoring our request and keep using the period.
Is there a way that you can code this memo field to where it will allow punctuation throughout, except at the end?
I have a form that I have opening in Filter by Form mode. It WAS working flawlessly, at least it was opening in that mode. It IS still requiring me to click on Toggle Fields once data is entered into controls to filter by, but that's another issue (I wrote a recent comment, but haven't gotten any response). Something different is happening suddenly that wasn't happening before. This form is a copy of a form needed to enter data.
Both forms read from a table which has several required fields. Suddenly, when I open the form to find records in ANY mode it's making me enter something into these required fields, even though I'm not searching/filtering by them. The message comes up "You must enter a value in the [Specific Required Field name here] Field." What did I do to make this start happening? How do I stop it? I DO want something to need to be entered in the required fields when new records are being entered and when things are being changed. However, I don't want it to be required during search processes.
I have a Table which has a column that contains a Data (last day of the month: 8/31/2013, 9/30/2013) and also contains a Balance field.
What I am trying to accomplish is a query that will provide me with the total for the last month (Sept), and then also provide me with a Percent break down from a whole balance.
I have the following SQL for it:
SELECT ATB.FC, Sum(ATB.Bal) AS SumOfBal, (select sum([Bal]) from ATB) AS Total, Sum([Bal]/[Total]) AS [Percent] FROM ATB GROUP BY ATB.FC, ATB.MMDDYY HAVING (((ATB.MMDDYY)=Date()-Day(Date())));
Right now, when I run the above, the Sum(ATB.Bal) pulls just the month of September, but the Percent is pulling a percentage of each Sept. Value against the whole Balance for the Year. So, when I sum the percent column to get a total of 100% for the month of September, I am ending up with a number less than 20%.
I'm looking for a bit of code for a module that will return the field name from an expression (that uses an array) instead of returning the value in that field.
Example: (Minimum is a working module that finds the smallest number in the array) Field1 = 34 Field2 = 53 Field3 = 21 Field4 = 62
The interface being used is a main form with various tabs and a subform on each of these tabs.
There is one field ('max power density') in my database that is calculated using 'Max Rated Power' and 'Cylinder Capacity' however these are in different tables and subforms. The 'max power density' and 'max rated power' are in table and subform 1 but 'cylinder capacity' is in table and subform 2. Is it possible to keep them in separate tables/subforms and still calculate the field?
I have a table with a text field (named Description), which may or may not contain an "ID Number", which is of the form [CHSV]#[A-Z][A-Z][A-Z]## - NB this is not necessarily at the beginning or the end, and will vary between records. For e.g.
So far I have considering LIKE, which is no good because it doesnt tell you where in the string the regular expression is, and INSTR doesnt work with regular expressions AFAIK.
Added bonus difficulty - I use the database as an external source for an Excel pivot table. I created a function (which I named JOBID) in VBA to do the above job easily enough i.e. I added a field "JOBID([Description])", but when I try to use the data in said pivot table, it says "Undefined function JOBID in expression". I have tried copying the function to the Excel workbook, but that doesn't work.
Im using Office 2003 if that makes any difference. Thanks in advance.
I have this expression I created and I want to know how to format it as currency. I know how to do it with a regular field but the option is not available for an expression.
The expression:
Code : Charge: IIf([Rate] Is Not Null,[Rate],"0.00")
I am using expression builder to specify a field in a report but it is acting more like a filter.So I have a report based on a query. However I want to add a field that is not in the query but is in a related table - called tblAgent.
So using expression builder I select the tblAgent in Expression Elements and then select the field from this table. This creates the expression =[Agent]![AgentAddress] however when I try to run the report it asks for a Agent parameter? Do I need to go back to reports 101?
I have a simple query to calcualte a profit margin on daily sales lines and I use a quick and dirty expression to calculate the margin in the query so I never need to drill it down further than that level (I don't want to go as far as putting the output into a report as it is only for use when double checking lines for errors which get fixed there and then in the database).
So far so good, however the margin output is a bit awkward to read as I can't seem to format it as a simple percentage. The field properties page doesn't like doing anything with the expression and even typing in a format manually has no effect, so I end up with figures like
Is there any way to format this output to show only 1-2 decimal places and be in a proper number format so I can sort them in ascending order properly?
Expr1 is a field in a report that is bound to this query.
timeline.CompanyName doesn't usually have any data in it, and when it does it needs to be removed and manually input into companies. Company Name.Is it possible to make timeline.CompanyName output as italics? Otherwise we dont know which field is populating.
Code: SELECT [timeline.CompanyName] & [companies.CompanyName] & " (" & [companies.city] & ", " & [companies.state_id] & ") ~ " & [timeline.Title] AS Expr1, timeline.showitem, timeline.EntryId, timeline.EmployeeId, timeline.CompanyName, timeline.EmpStartDate, timeline.EmpEndDate, timeline.Super, timeline.CoPhone, timeline.Notes, timeline.Title, timeline.company_id, timeline.start_date, timeline.end_date, timeline.assignment, timeline.notes_staff, timeline.showitem FROM timeline LEFT JOIN companies ON timeline.company_id = companies.company_id WHERE (((timeline.showitem)="false")) ORDER BY timeline.end_date DESC WITH OWNERACCESS OPTION;
I would like to create another field in the query using DLookup to return the value of the BrithMon.
BrithMonthID=DLookUp("MonID","tblListMons","BirthM on = Mon")
This works good if used with an unbound text box on a form, but when entered into a query expressions, an error is returned: cannot find the name 'BirthMon'
Can I used DLookUp in a Query expression to refer to another Query created field?
So I have built a form and added a field using the expression builder which is returning #Name? There is a relationship between the table on which the form is based and the record I am adding to a control.