Criteria Input Format
Jul 30, 2007
I have the following query.
SELECT Table.*, Table.Date
FROM Table
WHERE (((Table.Date) Between [start date] And [end date]));
Is there anyway I can format the box that prompts you for the start and end dates? I would like the format to be, mm/dd/yyyy ? Any help?
View Replies
ADVERTISEMENT
May 19, 2005
Hiya everyone,
I'm try to do a database for items with part numbers.
& I want to be able to set the field to only accept data which has two letters at the begining, but any other characters after that (no fixed size).
ie.
part num1: pn047589sdf8m3
part num2: pn6583
part num3: pnfdgmj5973m
part num4: pn-fdgmj-5973m
Is this possible to do?
Cos all I can do at the moment, is to put a fixed number of characters.
ie. is the field size is 30characters
then I'd have to do this:
>LLCCCCCCCCCCCCCCCCCCCCCCCCCCCC
but this isn't good.
I just need something like:
>LL*
* mean any character for as many characters in length.
Adam
BIGmrC
View 2 Replies
View Related
Feb 21, 2006
I guess this is pretty fundamental but I cant get it right! I want to search for a member by post code so I need to have validation for my table field post code so that when my parameter query accepts the post code input records will be returned covering all input types e.g. Users can put in CF72 (space)9AD or CF729AD and still get the same records or alternately how do I make users enter Post Codes with the correct UK spacing i.e 4 characters a space then the remaining characters?
View 7 Replies
View Related
Aug 21, 2006
Hi,
I am creating a database where the serialID can be a number of different 'formats'. TBH, I don't know if this can even be done in the first place, but on the off chance that it can....:p
Firstly, i'm not sure whether to use Input Mask or Format...
But the serial may be '1234567AB', '12345678AB' or '12AB1234AB'.
Or to put another way
'7 numbers 2 letters',
'8 numbers 2 letters'
or '2 numbers, 2 letters, 4 numbers, 2 letters'
I have tried creating a mask such as '00LL0000LL' (can't remember exactly, had some '9's in there too some where...) but just keep hitting a brick wall, whereby it not satisfying all of the types.
Any help much appreciated, Ben
View 1 Replies
View Related
Oct 17, 2005
I have a query which is pulling its data from a form, which in turn is pulling data from a table. When I select 0.82 on my form, my query runs fine. But when I select 0.826856 from my form the query does not return any result.
0.826856 is available in the table and the pull down list in the form. The data format for all my table, form and query is General and decimal places is set to 8.
Could you plz tell me why I am not able to run the query using 0.826856 ????
View 3 Replies
View Related
May 17, 2006
Hi All,
My Querie:
I have a relational database, that is basically made up of a few tables, I will
simplify for this to two.
TblFieldNames and TblFieldValues
Basically using a form you can fill in a field (TblFieldNames.FieldName) and it
is then appended to TblFieldValues.FieldValue.
On the form the properties of the input text box are changed according to the
record selected in TblFieldNames.
Ie. ListBox with FieldNames from TableFieldNames
ListBox_AfterUpdate sets properties of
TxtValue
The Issue:
I have a Field in TblFieldNames that has a setting of Currency.
(TblFieldNames.FieldType = "Currency")
I have changed the TxtValue.Format = "Currency"
It doesn't:
A. Allow entry as a currency, ie. $ sign and thousand seperators
B. Append the details to the TblFieldValues Table, which it is going across to
into a field that is set as Text (this can't change)
I have tried:
Changing format of input Txt box
Changing Input Mask for inptu Txt Box
"$###,###,###" but doesn't work for me....
"/$###,###,###"
"/$###,###,###!"
I want it to allow me to enter in the Value as a Currency and append the value as a currency
ie.
Key Press = 12345
Field Shows = $12,345
Appends this value as Text?
Key Press = 1234567890
Field Shows = $1,234,567,890
Etc
Any ideas?
View 1 Replies
View Related
Nov 18, 2004
Hi, I would like to create a Custom input mask in access 2000 with the format dd/mm/yy can someone please help me?
View 1 Replies
View Related
Apr 5, 2013
I have the following input mask for a certain field in an ACCESS 2010 table : 00-000-a-a-a;0;-
It works fine. That is when I tab down to it and if I know that the format is : xx-xxx-x-x-x
but if someone does not know the format , things can be out of position.how do I code the field such that the format (xx-xxx-x-x-x) is displayed in the input field awaiting the actual keying of the data?
View 2 Replies
View Related
Nov 21, 2012
I have problem loading data from an excel file in to a table. I usually import the excel file in to a table via VBA script (because there are some changes I need to do before importing).It was working fine until this week when the data in a cell for a particular column in the excel file changed from being 3 letters to 4 letters. The column in the table is defined as text.
The data in this column usually looks like 001, 002, 003 etc but one of the cells in the excel file has data as P001.So now I get an error Runtime Error 3349 even though I have defined the column as text. When I change the data P001 to 004 similar to the other data, it works just fine. Is there a format or Input Mask I can set so that the data are correctly loaded in to the table?Or am I missing something?
View 7 Replies
View Related
Dec 7, 2007
How do I apply this - can't seem to get it right - just want to control user into putting whatever and two deciimals for pence.
99.99 input mask is halfway there - except I don't want to limit the pounds amount. putting 99999.99 makes entering 12.31 etc a little awkward.
Cheers
View 5 Replies
View Related
Jun 29, 2014
Is there a Input Mask or Rule Validation that would automatically or require user to input data into Access field in a proper case format? Such as my text would be "My Text" when viewing the actual table? If so how would you do it when in Design View of Table.
View 1 Replies
View Related
Sep 3, 2013
I saw a demo that the user could copy and paste a JPG format file physically to ACCESS, and then something happened, and ACCESS could read the JPG length and width size (e.g. 1.3 meter length and 1.15 meter width) into 2 individual ACCESS cells which is acted the same as user input to that 2 clells.
View 14 Replies
View Related
Feb 28, 2008
hi,
new to the forum so hello everybody,
what i have is a table of contacts. this table has a field called locations. i have created a queriy that askes me the location which works ok. i could also have the criteria that has like "lo*" in it
but what i really need it the query to run ask me the location and i only put in LO* OR BI* etc
and the results i get are either london or birmingham etc
thanks for you help
steve
View 2 Replies
View Related
Oct 5, 2006
Last question.. honest.. maybe ;)
I have a query that prompts the user to display certain/all of the members in my member table. The problem is, using a parameter query in the memberID field only allows the user to send the message to one member, not multiple members. "1 or 2 or 3" or "1,3" obviously don't work.
I've tried creating a form with a list box to select the members (which I;ve done) but obviously you need code and stuff to get it to work which I think will be too complicated. Is there a simpiler way or is the form the only thing that will work?
Thanks
Kris
View 1 Replies
View Related
Dec 5, 2007
I seem to have run into a snag. I'm pretty sure this would work otherwise:
DLookup(iif(Left( [GenericFieldname1], 4) = "C101","Offered","NOT OFFERED"),"Generic Query")
When I added this field/function to the query, I got #error values and when I clicked on one, I got an error that said:
The expression you entered as a query parameter produced this error:The object doesn't contain the automation object 'Please Enter Year'.'
I assume the problem is that I have the user filter the report by use of the Like() function for [Year] in the query when the report is accessed. How do I tell the DLookup function to search the column as filtered by the Like() function?
View 1 Replies
View Related
Nov 4, 2005
Hi
This is simple im sure but i am a thicky
How do you allow a user to enter a value in a form; have access set that inputted value to a criteria in a query? Then ill have a button to run the query which i can do
thanks
thicky ste
View 1 Replies
View Related
May 31, 2006
Based on information from a earlier thread.... I created a Union query that pulls information from multiple tables and fields.
SELECT AG_B_R1 as Num FROM dbo_ADC_Ag_B_Res WHERE Rollnmbr=[roll]
UNION ALL
SELECT AG_B_R2 FROM dbo_ADC_Ag_B_Res WHERE Rollnmbr=[roll]
UNION ALL
SELECT AG_B_R3 FROM dbo_ADC_Ag_B_Res WHERE Rollnmbr=[roll]
UNION ALL
SELECT AG_B_R4 FROM dbo_ADC_Ag_B_Res WHERE Rollnmbr=[roll]
UNION ALL
SELECT AG_m_R1 FROM dbo_ADC_Ag_m_Res WHERE Rollnmbr=[roll]
UNION ALL
SELECT AG_m_R2 FROM dbo_ADC_Ag_m_Res WHERE Rollnmbr=[roll]
UNION ALL
SELECT AG_m_R3 FROM dbo_ADC_Ag_m_Res WHERE Rollnmbr=[roll]
UNION ALL
SELECT AG_m_R4 FROM dbo_ADC_Ag_m_Res WHERE Rollnmbr=[roll]
UNION ALL
SELECT AG_e_R1 FROM dbo_ADC_Ag_e_Res WHERE Rollnmbr=[roll]
UNION ALL
SELECT AG_e_R2 FROM dbo_ADC_Ag_e_Res WHERE Rollnmbr=[roll]
UNION ALL
SELECT AG_e_R3 FROM dbo_ADC_Ag_e_Res WHERE Rollnmbr=[roll]
UNION ALL SELECT AG_e_R4 FROM dbo_ADC_Ag_e_Res WHERE Rollnmbr=[roll];
And then I created another query to get the STDEV of the above query
SELECT StDev([Num]) AS StDev
FROM Q_cals_ag_bme_STDEV_Union;
The result will be on a subform on my main page. How do I get my form to input the [roll] automatically and requery the subform, showing my result.
Thanks
View 1 Replies
View Related
Oct 2, 2006
I have a database with the following information:
FTA # Date Attended Last name First name assigned person......
Each week I need to generate a report that shows the people that attended for that week, grouped by the assigned person. I only want to show the data for a specific "date attended" (i.e. that days date). I figured I first need to generate a query that only returns the data for that specific date in the "date attended" column. I did that but it is manuel by using the criteria field.
Is there an easy way to type in the date that I want the query to use as the criteria?
Thanks
:o
View 14 Replies
View Related
Jan 30, 2006
I have this select query.
SELECT DISTINCTROW L160.Date, Avg(L160.Zinc) AS [Avg Of Zinc], Min(L160.Zinc) AS [Min Of Zinc], Max(L160.Zinc) AS [Max Of Zinc], Count(L160.Zinc) AS [Count of Zinc]
FROM L160
GROUP BY L160.Date
HAVING (((L160.Date)=[Forms]![L-160quarterfrm].[Date]));
How do I build a form that would ask the user to input a range of dates for the criteria?
Thanks! :o)
View 1 Replies
View Related
Jan 27, 2006
How can I have a user enter the WHERE criteria in the Set Rs statement below.
Set Rs = CurrentDb.OpenRecordset("SELECT [Net] FROM [tblRecap] WHERE [Yr] = 2000 and [Event] = 'lancaster'")
I would like a message box to ask the user to define the [Yr] = and [Event] = fields since they would change from time to time and then pass the values to the OpenRecordset method. Is this possible? Can someone help supply the code?
A parameter query won’t work because when you manipulate these queries in DAO through VBA you need to supply the parameter value before you open the recordset object. If you don’t DAO generates an error.
Here is my code:
Option Compare Database
Option Explicit
Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
Dim ConsqWin As Long
Dim ConsqLoss As Long
Dim tmpWin As Long
Dim tmpLoss As Long
Dim Rs As DAO.Recordset
Set Rs = CurrentDb.OpenRecordset("SELECT [Net] FROM [tblRecap] WHERE [Yr = 2000 and [Event] = 'lancaster'")
Do While Not Rs.EOF
Do While Rs!Net > 1
tmpWin = tmpWin + 1
Rs.MoveNext
If Rs.EOF Then Exit Do
Loop
If Rs.EOF Then Exit Do
If tmpWin > ConsqWin Then ConsqWin = tmpWin
tmpWin = 0
Rs.MoveNext
Loop
Set Rs = Nothing
End Sub
By the way the YR field is a number and not a date so the WHERE clause doesn’t need #2000#
Any help would be appreciated.
View 2 Replies
View Related
Jul 26, 2013
I have a customers list that i am always ading to .I need to run a query to see what individual customers have ordered .
I have the query that works great when i manually insert the customers Surname .but i want the combo to do this job .Is it possible ,or should i be doing something different .
View 1 Replies
View Related
Aug 20, 2013
I am trying to get my VBA code to dump a query once the user pushes a button. I have the following code to call up the Excel app.
Code:
Option Compare Database
Private Type BROWSEINFO
hOwner As Long
pidlRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long
[code]....
The qry_PP_Errors_Union is a Union query. In this query there is a date field. I would like to be able to to use that date field as a parameter. So I have written this VBA to prompt the user for a Begin Date and an End Date.
Code:
Beep
strBegindatemsg = "Enter the beginning date." & vbCrLf & vbLf
strBegindate = InputBox(Prompt:=strBegindatemsg, Title:="Begin Date")
Beep
strEnddatemsg = "Enter the beginning date." & vbCrLf & vbLf
strEnddate = InputBox(Prompt:=strEnddatemsg, Title:="End Date")
Now the part that I am missing is that I am not sure how to make the "strBegindate" and "strEnddate" the criteria for the union query.
The following is the SQL for my union query.
Code:
SELECT LastName, FirstName, Title, TeamName, WorkOrderNumber, DateCompleted, WorkCode, UICError AS Error, "Update and Internal Correspondence" AS Category FROM qry_PP_UIC_Error
UNION
SELECT LastName, FirstName, Title, TeamName, WorkOrderNumber, DateCompleted, WorkCode, BIDError, "Bids" FROM qry_PP_Bid_Error
[Code] ....
Without the criteria, my code works for dumping everything out into Excel. However, dumping all the data results in a 7 mb Excel file that requires manual deletion of the information that is not pertinent.
View 3 Replies
View Related
Dec 22, 2014
I have two tables linked by ID (Table1,Table2)
The Table1 holds data that is a request for a task.
ID, Request, Task_tms (the number of times the task is required to be done)
1, Make a cup of coffee,15
Table2 is my allocation of people to the tasks.
ID, Person, Task_done (the number of times this person has done the task)
1,Sally,10
1,Eddie,5
What I want to do is to limit the amounts of allocation in some way (ie in this case if I have already put 10 for Sally then I would be unable to put anymore than 5 when entering the amount for Eddie.
Additionally if I were to allocate all 15 to Sally then no additional people would be able to be allocated to this task (ID 1)
The two table are in datasheet format linked on a form.
View 1 Replies
View Related
Apr 5, 2013
I use expression on the query field, but after I run it, the field change its format from number to text, how to reformat on the query criteria to change the text to integer format?
View 8 Replies
View Related
Mar 19, 2012
in a query, I would like to capture data that is in the following format:
123456 (6 digits) AND
A12345 (1 letter and 5 digits) AND
AB1234 (2 letts and 5 digits)
The letter could only be at the beginning of the abbreviation.
View 1 Replies
View Related
Aug 18, 2015
I have a query that uses the input from a form as criteria, which is then used in a report. The form input is a drop down based on another table. This is a sales pipeline report, and the list is a list of sales people. The report works perfect for all sales people except one. When I run it for the one, I get the following error:
"This expression is is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables".
I DO NOT get the same error when running the query by itself - so assuming there is something in the report causing this. I do have some sum formulas in the report.
Again, no other salespersons selected cause this error -- so I am assuming there is something in the dataset for this person that is causing the error.
View 8 Replies
View Related