Asking A Text Box To Return A Number

Jan 28, 2005

Hi guys and gals,
I have compiled a very simple database to track staff and training audit requirements for my company.
I am 57 thick as 2 short planks and need some help please.
I wish to ask a text box called "Score" to return a number 2 if a yes/No box is "NO" and a number "1" if the Yes/No box is "YES".
I have looked at the help sections of Access and thought maybe an "IIf" statment in the Validation Rule section of the "Score" box might do the trick.
However, i haven't got a clue as to what the coding should be written like.
Can anybody help me please.

Basically i want to say
"If YES/NO = NO then SCORE = 2 but If YES/NO = YES then SCORE = 1"
Told you i was thick

View Replies


ADVERTISEMENT

General :: Make A Text Box On A Form To Return A Number

Feb 25, 2013

I am wanting to make a text box on a form, to return a number (amount of records returned by a query)basically so if the query returns 5 records, the text box on the form will show"5",

Lets say the form is called "A", and the query is called "B" .How do I put this in the source control of the textbox ? < if this is right too ?

View 1 Replies View Related

Queries :: Return Yes Or No If Other Text Field Contains Particular Text

Feb 18, 2015

Produce a query that returns a yes or no (Y or N) field if other text field contains particular text (with wildcard on either side).

Idea is to have a column for each preset word.

View 2 Replies View Related

Queries :: Return More Than One Number?

Oct 24, 2014

i have a query with an inputbox for numbers [Enter Number]..if i want the query to return multiple numbers how would i do this? so the user could have 3 5 and 8 to search for, currently the [enter number] allows them to search for one at a time.

View 1 Replies View Related

Queries :: Return Number Before Letters

Mar 12, 2015

I would like to run a query which takes a code which contains a mixture of number and letter and returns all the number before the first letter. I was using the left function (=Left(([Codes],2)) but sometimes there is one number sometime two. The desired results are shown below;

7pol2try36 = 7
12cet9fre55 = 12
10yea3gtr77 = 10

Is this possible?

View 3 Replies View Related

Queries :: Return Char Number Value As Numeric

Nov 19, 2013

I have tried to use a bit of code so return the Last Year and WeekNo in my database, to select some records but�. It currently fails, I think this because it returns the values as text and will then not compare to a numeric field. Is there an easy way to change this code so it returns numbers.

qryCurrentWkYr

Code:
SELECT
Right(yw,2)
AS week,

[Code].....

View 3 Replies View Related

Forms :: Return Number Of Matching Records

May 12, 2015

I have a datasheet form listing prospect information.

Each prospect is assigned a position, there can be more than one prospect with the same position.

I'm trying to get a text box to lookup the prospects position and search the remaining rows for matching positions and return the total number found.

This data does not need to be stored anywhere, just a reference value for users to look at.

View 4 Replies View Related

Queries :: Return Week Number On The Basis Of Date

Jan 23, 2014

I've been trying to create a query that will take a date and return the week number of the date.

My original date is formatted m/d/yyyy

I need my weeks to start on Monday and I would like the week containing Jan 1st to be the first week of the year

I have tried using the following function:

DatePart("ww",#12/31/2001#,2,1)

but the I get a result of 53 in this query, when I expected/need it to be 1.

View 4 Replies View Related

General :: Return Max Number In A Field Then Increase By 1 For New Record

Oct 23, 2013

I'm using Dmax() to return a max number in a field which I then want to inc by 1 for a new record. Dmax is returning 999. I believe Dmax therefore thinks it's a text field. So where do I change this to a number field?

View 2 Replies View Related

Queries :: Return List Of Students Attended Certain Number Of Sessions At Gym

Sep 2, 2013

I'm trying to return a list of students in a particular team who have not attended a certain number of sessions at a gym, between two dates. For some reason i get the error. At most one record can be returned by this subquery. (Error 3354).

SELECT [Student ID], Count(*) AS ["Number of Times Attended"]
FROM Gym_Attendance
WHERE [Gym Date] BETWEEN [Forms]![SV_Attendance]![txtStart].Value AND [Forms]![SV_Attendance]![txtEnd].Value
AND [Student ID] Like
(SELECT [Student ID]
FROM Student_Sports
WHERE [Sporting Team] = [Forms]![SV_Attendance]![lstTeam].Value)
GROUP BY [Student ID]
HAVING Count(*) < [Forms]![SV_Attendance]![txtNo].Value;

View 1 Replies View Related

Modules & VBA :: Multi Criteria DLookup - Return ID Number Of Entry

Dec 4, 2013

I am trying to make a DLookup function to return the ID number of an entry that matches 2 or 3 criteria but I am struggling to get the syntax correct for the second and third criteria.

Here is what I have so far:

1 criteria, works fine =DLookUp("[timedata]![id]","timedata", "[processdone] =" & Forms![Mainform]![p11] )

2 criteria, works fine =DLookUp("[timedata]![id]","timedata", "[processdone] = " & Forms![Mainform]![p11] & " And [timedata]![BGSnum] = 1001" )

BGSnum is a numerical value but it changes for each form I load, so what I want to do is use the form location value as the criteria.

E.g.

=DLookUp("[timedata]![id]","timedata", "[processdone] = " & Forms![Mainform]![p11] & " AND [BGSnum] = ' " & Forms![Mainform]![BGS] & "' ')

and possibly a third criteria too. This is where I am having problems and the syntax is wrong so MS Access wont let me save the macro.

View 6 Replies View Related

Number Fields In Text To Number Field, Formula For Fiscal Year

Nov 26, 2004

Date of Birth (DOB) field etc. in one program are text - how do I make another file with the same data into number fields for Date of Birth field etc? When I copy data to file that has number fields the 09252004 is changed to 9252004. Can I get reports with the correct Date of Birth in them by moving data from text file to number file?

There is data entered monthly in file and formula has been set up for January, February etc as ---quarter: Int(([month]-1)/3)+1. I would like formula for the fiscal year for April to be counted as month 1, May - month 2, June as month 3, July as month 4, August as month 5, Sept as month 6, October as month 7, Nov as month 8, Dec as month 9, Jan as month 10, Feb as month 11 and March as month 12.

Thank you

View 6 Replies View Related

Return Last Month Value In A Text Box

Aug 26, 2006

I have used the following function to return the date of the previous Sunday in a text box when I open a form..

=Date()-Weekday(Date()-1)

In a different text box I would like return the pevious month based on the date in the text box.

For example the above function would return date 20/08/06. I would like to display JUL-06 in the second text box. Can anybody help?

View 2 Replies View Related

Text Return Based On GPA

Nov 10, 2004

Dear All:

Thank you for all you help with the above title. Your suggestions were all implemented.

Code:
Private Sub GPA_AfterUpdate()
If DIVISION = GRADUATE Then 'Honors field is empty
HONORS = ""
End If
If UNDERGRADUATE = True Then 'Apply appropriate honors
End If
If GPA < 3.2 Then
HONORS = ""
ElseIf GPA >= 3.2 And GPA < 3.5 Then
HONORS = "CUM LAUDE"
ElseIf GPA >= 3.5 And GPA < 3.8 Then
HONORS = "MAGNA CUM LAUDE"
ElseIf GPA >= 3.8 Then
HONORS = "SUMMA CUM LAUDE"
End If
End Sub

Here is the issue: Form created with with a combo box called "DIVISION."The choices of the combo box are "GRADUATE" AND "UNDERGRADUATE." There is a text box called "GPA", where a gpa is entered. then, there is an "Honors" field. When a gpa is entered, the honors box returns the appropriate message.

When graduate is selected from the combobox, the honors box should be empty. (That part does not work.) When undergraduate is selected from the combo box, it works.

Please help,

Dion

View 5 Replies View Related

Honors Text Return Based On GPA

Nov 9, 2004

Dear Access Wizards:

I have created a form based on a query with students' gpa in the form. The gpa is in a specific field.
There is another field for honors with is for summa cum laude, magna cum laude, cum laude.

Here is the issue: If the students' gpa is 3.8, return "summa cum laude"
If the students' gpa is 3.5, return "magna cum laude"
if the students' gpa is 3.2, return "cum laude"

This applies to undergraduate students only, which there is a field for.

Any ideas on how to resolve this issue?

Many thanks,

Dion

View 3 Replies View Related

Return Value From A Table Based On A Text Field

Aug 27, 2006

I have created a text field on a form that uses the DateSerial function to return the value of last month e.g. Jul-06.

I have a table that contains months (e.g. Jul-06, Jun-06 etc) and a corresponding numeric value (e.g. 1,2,3).

I have another text box on the same form that I want to display the numeric value in based on the value that has been returned by the DateSerialfunction. What properties/control source should I set for this field? Or do I need to write some VBA?

Any help would be appreciated.

View 2 Replies View Related

Return Size Of A File In Form Text Box

Feb 17, 2005

A quick question that I'm sure one of you guys will be able to answer without any trouble, but I'm having difficulty with...

I have a form on which I would like to have a text box which returns the size of a file on my PC. The file path will not change.

Any ideas would be appreciated.

Thanks in advance.

View 1 Replies View Related

Using A Checkbox To Return Text Based On Another Textbox

Apr 26, 2005

Dear All:

I have a form with three items:a checkbox called "Check231", a textbox called "text921" and another textbox called "text762".

What I wish to do is: Enter text in textbox921, which stays the same as I scroll through each record. Then If checkbox check231 is checked, it displays text from textbox921 to textbox762. Textbox762 is bounded to the form.

Any ideas on how to get started?

Many thanks,

Dion

View 1 Replies View Related

Queries :: Return / Extract Just Text From Field

Aug 5, 2013

I have a field which contains "01501 PRIKLJ. VRHNIKA - LJ / Stevno mesto" .

1.) I would like to extract just text part from that field, how? *number is always on beginning but different 1-10000

2.) Optional, how could I delete in this new only text field part of text after / ...*some rows have some dont /

View 1 Replies View Related

Queries :: Return Value In A Text Box On A Report If String Contains?

Mar 24, 2014

In my query, I have the week number and year arranged like this - "Y14-W11"

I want to return a value in a text box on a report if the string contains, for example, W11. In this textbox I've put the expression

Code:
=IIf([Y##-W##]="*" & "W11" & "*","2100000","BLAH")

But this just returns the falsepart no matter if the string contains W11 or not.

View 3 Replies View Related

Queries :: Search For Certain Text In A Field And Return Value

Jan 1, 2015

I am trying to search for specific text in a field and returns its value. For instance some of string includes Sub, L2L, Temp, Model, or MTM and I would like a query to return these values if found.

View 2 Replies View Related

Queries :: Postcodes - Return Only TEXT Before Numbers

Jun 17, 2015

I have a number of short postcodes ie

S43
GU10
ME8

etc etc

I want a run query to return only first characters before the numbers ie..

S
GU
ME

View 4 Replies View Related

Return Column Header Text On Right Click Of Listbox

Apr 13, 2006

How do I return the Column Header Text on Right Click of listbox?


Thanks

View 5 Replies View Related

Queries :: Select Query Return (text) Instead Of (Boolean Value)

Mar 26, 2015

how to do to return a text for each row (as field value) when a table field contains "1" as value ?

for example i have a table named "products" with a field/column called "promotion". Sometime a product is promotional, so in this case, the "promo" column holds "1" as value.

during a select on products table, how can i do to return "in promotion" (e.g.) if the column "promo" holds "1" for a product ?

View 1 Replies View Related

Forms :: Apply Filter To Return Records That Matches The Text Exactly

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

Forms :: Add A Name To Text 1 Automatically Set Number To Text 2

Feb 14, 2014

I want 2 text , when I add a name to text 1 automatically set number to text 2 (Random),

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved