Option Button - Use Text Instead Of Numeric Value In My Query/report
Apr 26, 2007
Hello,
I am not sure what cateogory to choose for this question but I would greatly appreciate your help.
I have 5 buttons in my option group:
1. very often
2. often
3. occasionally
4. rarely
5. never
I have to produce a report using description of each button in my report, not numeric value. I heard something about global variable but I am not sure how to do it.
Many thanks,
Debbie
View Replies
ADVERTISEMENT
Jan 23, 2007
Hello all
i need to create a text field and button in a form that will show all the records for a particular JobNo in a report once the txt has been typed and the button is clicked, i.e if I type JobNo001 I need to to create a report showing all the information for that JobNo(but there can be multiple JobNo's).
Do i have to create a query for this. I am new to this so please be gentle
Thanks
Chris
View 1 Replies
View Related
Jun 9, 2014
I have a retort that I want to use an option button to filter the report is a specific date is 48 hours before the current time. I'm not having any luck. Below is the code I have been playing with, but no go.
Private Sub NoMove_Click()
Select Case Me.NoMove.VALUE
Case 1
Me.Filter = "CLM = 'Now() - 48'"
Me.FilterOn = True
End Select
If Me.Filter = "" Then
MsgBox "The filter returned Null"
Else
End If
End Sub
View 14 Replies
View Related
Mar 11, 2014
I have a text field having data i-e HO-1, HO,2, ACW-25 and so on. The field name is nBadge_num and is Unique. The data in this field is sorted automatically like 1, 10, 11, 12, 13, 2, 3, 4, 5...because this is the text field.
The number on the form is automatically generated, when the user type HO- for example on field exit event. The last number will generate like HO-5.
Code for automatic number generation is:
Dim dbs As Database, rst As Recordset, Response
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("SELECT Max(Right([nBadge_Num],Len([nBadge_Num])-" & Len(Me.NBadge_Num) & ")) AS MaxNo " _
[Code]....
My problem is when the number is generated it give HO-5 instead of HO-14, How can I sort the numeric part of the field ?
View 2 Replies
View Related
Mar 14, 2013
is there an easy way to do a conditional format on a report where the value is 1,2,3,or 4 from an option group. I want the 1=Yes, 2=No, 3=Maybe etc.
View 1 Replies
View Related
Apr 26, 2007
Hello,
I am not sure what cateogory to choose for this question but I would greatly appreciate your help.
I have 5 buttons in my option group:
1. very often
2. often
3. occasionally
4. rarely
5. never
I have to produce a report using description of each button in my report, not numeric value. I heard something about global variable but I am not sure how to do it.
Many thanks,
Debbie
View 1 Replies
View Related
Aug 18, 2014
I have a table that has several fields including CallID (autonumber) and SKU (text)
SKU can be anything up to 9 characters, sometimes numeric sometimes alphanumeric. For example: 24300, AA23145, G58d444, 24999, 89332,...
Based on the Count of CallID I can easily get the top20 calls on each SKU. This is the query I use for that:
Code:
SELECT TOP 20 Count(Calls.CallID) AS CountOfCallID, Calls.SKU
FROM Calls
GROUP BY Calls.SKU
HAVING ((Not (Calls.SKU) Is Null))
ORDER BY Count(Calls.CallID) DESC;
The problem is that now I have been asked to create two different lists. One that has the top 20 SKU that range from 24520 and 24599 and another one that does the res tof the SKUs.
Obviously my problem is that the SKU field is text, not numbers so I can't just limit the results in the query by using "Between 24520 and 24500" in the query criteria.
View 7 Replies
View Related
May 14, 2014
how i would filter a form using an option button. E.g i want to be able to click an option button that is called Filter user and it will filter the query based on who is logged in? and a Filter all option that will clear the filter and show all records?
View 3 Replies
View Related
Jun 25, 2014
I have a database I use at work for writing up non-conformance reports and we have 5 different dispositions(see picture) but when we run our report, they show up as numbers(1-5). I want to know how to get them to show up as text. I went into the main table and changed the "disposition" category to text and changed each button to show what text I wanted it to but for some reason it wont save. When I go back and click the radio button and bring up the properties, it reverts back to a number. I just want our dispositions to show up as the text(Use As Is, Rework, RTV, etc) instead of numbers when we run our monthly report.
View 6 Replies
View Related
Jul 11, 2015
Im using a button to print a report based on a text box values on the form.the code for which is below
Code:
Private Sub SaveBtn_Click()
DoCmd.SetWarnings False
DoCmd.RunSQL "Update BookInTable SET DateBookedOut = '" & Me!DateTxt & "' WHERE BarCode ='" & Me![BarTxt] & "'"
DoCmd.RunSQL "Update BookInTable SET BookedOut = True WHERE BarCode ='" & Me![BarTxt] & "'"
DoCmd.OpenReport "Labels", acViewNormal
DoCmd.PrintOut , , , , 1
DoCmd.Close acReport, "Labels", acSaveNo
DoCmd.SetWarnings True
End Sub
The problem that I am getting is not only is the label printing but so is the form.
View 3 Replies
View Related
Oct 1, 2014
I'm working on a form that I want to insert a plus button/minus button.I am aware of the vba code numbers 107 and 109 if you want to use the actual keys but I would rather use a button.
I made a button and here is the code I used now. This code is numeric box specific. So it only adds one to the MileageStart numeric field. (Additionally you can put a minus in to subtract one).
Private Sub Command153_Click()
MileageStart = MileageStart + 1
End Sub
Instead of having a bunch of these buttons all over boxes on my form is there some code that I can use to "select" a text box and just have the Plus/Minus button on the form header that I would hit and it would add or subtract (and then I could go to another box select it and hit Plus/Minus and so forth).
View 7 Replies
View Related
Feb 11, 2014
I would like to store the string in my table when I choose a string from a combobox or radio button in the form.For example, if I choose 'Business' ( from major field in my department table ) in my combobox, I expect there is a 'Business' in my major field in my department table. And if I click radio button labled 'A' (position field), I expect there will be 'A' in the position field in my table. However, those only store numeric values, for example '3' for 'Business' and '1' for 'A' in the table. How can I store the 'real value' in my table instead of number when I choose them.
View 3 Replies
View Related
Jun 21, 2005
I have made my Search Form that will search through my tables, some how I have a syntax error for the following: year, Section and ID, these fields are not text I use numeric values so I think the search is not working for that reason, I am not sure how can I fix it though do I have do add val() or sth.
Private Sub Command8_Click()
On Error GoTo Command8_ClickError
Dim db As Database
Dim rs As Recordset
Dim rs2 As Recordset
Dim strWhereCondition As String
Dim strSql As String
strWhereCondition = ""
strSql = "Select distinct Id From AcademicVideo Where True "
'================================'
If Not IsNull(ID) And Trim(ID) <> "" Then
strSql = strSql & " And [Id] = " & [ID]
End If
'================================'
If Not IsNull(Course) And Trim(Course) <> "" Then
If InStr(Course, "*") = 0 Then
strSql = strSql & " And [Course] = '" & [Course] & "'"
Else
strSql = strSql & " And [Course] like '" & [Course] & "'"
End If
End If
'================================'
If Not IsNull([Format]) And Trim([Format]) <> "" Then
If InStr([Format], "*") = 0 Then
strSql = strSql & " And [Format] = '" & [Format] & "'"
Else
strSql = strSql & " And [Format] like '" & [Format] & "'"
End If
End If
'================================'
If Not IsNull([Title]) And Trim([Title]) <> "" Then
If InStr([Title], "*") = 0 Then
strSql = strSql & " And [Title] = '" & [Title] & "'"
Else
strSql = strSql & " And [Title] like '" & [Title] & "'"
End If
End If
'================================'
If Not IsNull([Lecturer]) And Trim([Lecturer]) <> "" Then
If InStr([Lecturer], "*") = 0 Then
strSql = strSql & " And [Lecturer] = '" & [Lecturer] & "'"
Else
strSql = strSql & " And [Lecturer] like '" & [Lecturer] & "'"
End If
End If
'================================'
' If Not IsNull([Section]) And Trim([Section]) <> "" Then
' If InStr([Section], "*") = 0 Then
' strSql = strSql & " And [Section] = " & [Section] & "'"
' Else
' strSql = strSql & " And [Section] like " & [Section] & "'"
' End If
' End If
'================================'
If Not IsNull([Semester]) And Trim([Semester]) <> "" Then
If InStr([Semester], "*") = 0 Then
strSql = strSql & " And [Semester] = '" & [Semester] & "'"
Else
strSql = strSql & " And [Semester] like '" & [Semester] & "'"
End If
End If
'================================'
If Not IsNull([Year]) And Trim([Year]) <> "" Then
If InStr([Year], "*") = 0 Then
strSql = strSql & " And [Year] = " & [Year] & "'"
Else
strSql = strSql & " And [Year] like " & [Year] & "'"
End If
End If
'================================'
If Not IsNull([Description]) And Trim([Description]) <> "" Then
If InStr([Description], "*") = 0 Then
strSql = strSql & " And [Description] = '" & [Description] & "'"
Else
strSql = strSql & " And [Description] like '" & [Description] & "'"
End If
End If
'================================'
Set db = CurrentDb()
Set rs = CurrentDb.OpenRecordset(strSql, dbOpenSnapshot)
' If (rs2.RecordCount = Null) Then
' MsgBox "Enter A valid Record"
If (rs.RecordCount = 0) Then
MsgBox "Could Not found "
Else
strWhereCondition = "[Id] In (" & rs!ID
Do While Not rs.EOF
strWhereCondition = strWhereCondition & ", " & rs!ID
rs.MoveNext
Loop
strWhereCondition = strWhereCondition & ")"
End If
rs.Close
If strWhereCondition <> "" Then
DoCmd.OpenForm "ACVideo", acNormal, , strWhereCondition
DoCmd.Close acForm, "Search AcVideo"
End If
Exit Sub
Command8_ClickError:
MsgBox Err.Number & " " & Err.Description
Resume Next
End Sub
View 2 Replies
View Related
Mar 4, 2008
Hello there,
In excel spreadsheet, when I eg type in a numeric column 10 1500 so on, I would column11 appear text such as one thounsand and five hundred. How can I convert this?
Would that be possible?
Thank you in advance
Cheers
View 1 Replies
View Related
Mar 11, 2008
Im trying to construct a query which returns a field that has 21 different types of values.
Is there a way to assign a text value to each numeric value when the results are displayed?
Eg: 21 = "Local Sales", 22 = "National Sales", 23 = "International Sales".. and so on.
Ive looked at the Choose and IIF functions but I cant seem to work it out
..............
Anouther little problem, which should be basic. I want to exclude certain records with values such as 31 and 41 and 42.
When i type <> 31 or <> 41 <> 42 in the criteria they are all still displayed. Although when I type one of those criteria by themselves they ARE EXCLUDED. Is there something dumb I am missing here??
thanks in advance.
View 6 Replies
View Related
Jun 6, 2005
Lets say that I have a large list of locations in a listbox. What I want to do is to be able to have an option button that I can press in that will sort these locations. Like 3 or 4 different buttons, lets say like retail, finance, ect. Anyone know what kind of code I might have to use to make these sort on clicking the option button?
View 4 Replies
View Related
Mar 23, 2006
I'm working on a survey database, I'm having the users select the opton button to rate (1 - 10). Then as an after thought, I thought I would add a button that says N/A or doesn't apply. Course option buttons store numbers.
ANy idea's on how to accomplish this? What ever value gets stored I wouldn't include it in the results.
View 1 Replies
View Related
May 30, 2006
Hi peeps,
I am encountering a few problems when I'm using the options button on a form.
Is there a way for the options button to display a different value instead of a -1 when the data is transfered to a linked table? i.e Good or Poor or Fair?
Also can a number of option buttons have the same control souce? at the mintue I have three buttons pointing at one control souce and when I select one of the buttons they all get selected.
Any help will be much appreciated.
View 14 Replies
View Related
Dec 7, 2006
I have a table that has 300+ peoples names on it. Each of these people has a region they belong to 1,2,3,or 4. I also have a form that has 3 combo boxes that are linked to this one table. This information is sensitive and can change by importing new data as well. Is there a way that I can add 4 option buttons, depending on what the user clicks on Opt1, 2, 3, or 4... that is what populates the combo boxs? This seems rather simple, but I can't figure it out.
View 1 Replies
View Related
Jan 24, 2006
Hello,
how do I reference the value of an option button in an option group?
i tried this:
Code:If [exact] = -1 Then where = where & " AND [SerialNumber] = " & Me![serialno] ElseIf [exact] = 0 Then where = where & " AND [SerialNumber] = " & Me![serialno] Else where = where & " AND [SerialNumber] Like '*" & Me![serialno] & "*'" End If
attached is an image of the form.
thanks
View 1 Replies
View Related
Mar 14, 2007
Access 97 SR1
I am importing a file that has two numeric fields in it. I was asked to import as fixed length text fields with leading zeroes and no decimal point.
I am supposed to export the data in Csv format.
Source field from IBM iSeries DB: quantity is 15,3. Quantity source value is 9, requested text format of five characters 00009, the Csv result is 9. The field in Access is defined as Text 5 characters.
Source field from IBM iSeries DB: price is 17,4. Price source value is 1020.0000, requested text format of nine characters 000001020, the Csv result is 1200.00. The field in Access is defined as Text 9 characters.
Thanks,
Dave
View 1 Replies
View Related
May 14, 2005
I use Access as my grading program at school. Right now, if I want to excuse a student for an assignment, I delete that record.
What I would like to do is put an "X" or some other string into a field that is numeric and Access would ignore that score when computing the average.
A longshot, but I thought I would ask.
Thanks.
View 3 Replies
View Related
Dec 19, 2005
I have a number of categories on which I assign a relative risk - at the moment H, M and L. Previously I had these set as a value selection combo and they were as 'text'.
More recently I have changed this now to a lookup and put the risk rating into a separate table. As a consequence the field is now 'numeric' but displays text from my combo.
When running a linked query I now get an error message instead of the required response.
My query should report back a 'Yes' if the queried cell contains an 'H' or 'M'.
Audiometry: IIf([tblRiskProfile]![Noise]="H" Or [tblRiskProfile]![Noise]="M","Yes","No")
However, this obviosuly doesn't work now because of the cell properties being numeric. How do I ammend the string above to run the same query?
View 1 Replies
View Related
Oct 20, 2006
I have a query that calculates the number of games won and lost over the course of a season.
I would like to export the query results as a report in Excel format.
What I need to do is take the won/loss field in the query
WonLost:([GamesWon]&"-"&[GamesLost])
and export the result as text.
When I do it as above, the results in Excel are numeric.
Example: Games Won = 12 Games Lost = 3 it exports it as 9
(12 subtract 3).
View 7 Replies
View Related
May 26, 2013
I want numeric only input for a certain textbox. I can use a ISNUMERIC function to test this, but prefer to use the Keypress event. So far got the following:
Code:
Private Sub txt_Position_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 8 ' backspace
Case Asc("1") To Asc("9")
Case Asc("-")
If InStr(1, Me.txt_Position.Text, "-") > 0 Or Me.txt_Position.SelStart > 0 Then
[code]...
It is working alright, except I want to avoid input that has multiple leading zeros, such as 00000 or -00000 (i.e. minus sign with mulitple leading zeros).
View 10 Replies
View Related
Jul 1, 2013
I have a field that will only get numeric values, numbers. And it will always have four characters or less. I do have times when I worry my data by over eighty's certain size or I average value, or both. Is this possible when using a text field.
View 14 Replies
View Related