Hi,
I am building a database to record incidents in the workplace. I have a main table which records the details of an incident, time place type etc. My other tables record information on each type of incident, injury, loss, fire etc. Since all incidents have details I use this as the main...
Thanks for that Golom,
It seems the problem is using the Replace function in the initial query
Using " Replace([tblIRS.strScope],"-","") " returns all records (minus the hyphens) IF no criteria in the query.
If any of the following used as criteria gives data type mismatch error...
Like'*' or...
Hi,
Thanks for the reply
I have made the query below based on data table. The query runs fine and all the hyphens are removed from the strScope field.
SELECT tblIRS.pkeyIRSID AS [IRS No], tblArea.strArea AS [Process Area], tblType.strType AS [IRS Type], tblIRS.ysnLocked AS Locked...
Thanks for reply.
After going through the tables it seems I will have to strip all spaces and dashes (wherever they may be)out of the string to return all the right records... As some are entered as 52PU001, or 52-PU-001, or 52 - PU001 etc...
Any thoughts?
Cheers
Hi,
As part of my query I have the following code...
If Not IsNull(Me.txtScope) Then
strWhere = strWhere & " (tblIRS.strScope)" & _
" Like '*" & Me.txtScope & "*' AND"
End If
In Me.txtScope a user may type 52PU001 or 52-PU-001.
How can I modify so that it returns both inputs?
Thanks
Hi there,
I have a check box on my form which checks if fields are filled in or not.
Here's part of the code (BeforeUpdate)
Case IsNull(Me.strScope)
MsgBox "Please enter a Scope of Work.", vbOKOnly
Cancel = True
Me.Approved.Undo
Exit Sub
Case IsNull(Me.memHazard)
MsgBox "Please enter...
Hi there.
My app has about 40 users. Everytime I open the root folder where it resides I see multiple copies of the database... eg db1.mdb db2.mdb etc.(up to 50 now)
The app is split with FE mde file. All security is in place on both FE & BE. All users are full data with only 2 admin users...
Hi,
Is it possible to enable/disable a control on a form based on the user's permissions? eg. Command button - enabled for Admin users (or logon name) but not enabled for other users.
Cheers,
millrat
Ahhh!!! Silly Me,
This works
SELECT IIf(InStr([Field1],"<")>0,Val(Mid([Field1],2)),[Field1]) AS Expr1
FROM Table1;
So does this
SELECT Format(CSng(REPLACE([Field1],"<","")),"####0.00") AS Expr1
FROM Table1;
Thanks guys
Hi Remou,
My test Table1
Field1
1.1
0.01
<0.05
After plugging this into my test query as citeria I get
SELECT [Table1].[Field1]
FROM Table1
WHERE ((([Table1].[Field1])=IIf(InStr([Field1],"<")>0,Val(Mid([Field1],2)),[Field1])));
This only returns numbers with no "<" sign
ie
1.1
0.01
Is...
Hi all,
I have numbers stored as text in a table because some have a "<" sign in front of them.
How can I trim the "<" from the front (for those that have it) in a select query and convert to a number?
eg <0.05 (text) to 0.05 (number)
Cheers,
millrat
Hi all,
I have audit trail using Me.Combo.OldValue and Me.Combo.Value. This gives only numbers in my table i.e. Column(0).
How to use Column(1) for text and what is correct syntax for below?
e.g. Me.Combo.Column(1).OldValue...(this don't work but it's what I want)
Cheers,
millrat
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.