Single Quote Glitch
Jan 6, 2005
Hi,
When trying to update an access membership db where expired members are
being set to 'inactive' the script keeps hanging up with a runtime error
when the first or last name of the member
has a single quote in their name (eg O'Neil)
Any ideas where to look to fix this would be appreciated.
Regards
Justin
View Replies
ADVERTISEMENT
Aug 31, 2003
i have an error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Products.Catalogs LIKE '%[a-z]%' AND (Products.ItemName LIKE '%t'ai%') AND ((Products.NewItem = True) OR (Products.HotBuy = True)) ORDER BY Products.ItemName'.
/webdev/flaghouse/NEWITEM_List_Main.asp, line 149
this results when search terms contain a ' (SINGLE QUOTE). i've tried to double up all of the SINGLE QUOTES in the code and still get an error.
heres the CODE:
' check if keywords entered, split comma-delimited list into array of keywords
If Request("Keyword") > " " Then
theKeyword = Request("Keyword")
listKeywords = split(theKeyword,",")
maxCounter = ubound(listKeywords)
whereClause = "Products.ItemName LIKE '%" & listKeywords(0) & "%'"
FOR counter=1 TO maxCounter
theKeyword = listKeywords(counter)
whereClause = whereClause & " OR Products.ItemName LIKE '%" & theKeyword & "%'"
NEXT
SQLString = SQLString & " AND ("
SQLString = SQLString & whereClause & ")"
Else
theKeyword = "None"
End If
if anyone sees anything amiss, please let me know. i'm at wit's end!!
thanks. please email me at: URL. again, thank you in advance for your help.
kwc
View 5 Replies
View Related
Mar 19, 2008
I have a split database. I hope I can explain this well....
I have a network mapped drive on all computers (win xp pro) of G: I have obviously a front end that was created when it was split.
I keep that fornt end file in same folder of the backend side of things, and I simply copy that exact tile (the front end) and place it on to the desktops of the workstation PC's and my database seemed to work, obviously I do rename the front end file on all PC's to Workstation 1, Workstation 2 and so on.
The front ends on workstations all do connect to the backend and the data does appear in the front ends and new records can be added and edited.
However I have a few issues:
1) If Workstation 1 was editing record 1 and workstation 2 was on another record say '232' and workstation 2 wanted to view the changes made to record 1 then he/she would have to wait till the the user edits the edited record and wait 5 seconds to see any changes. It would appear there is a slight delay in seeing the updated data.
2) If for example the user on workstation 1 adds a new record then it does update it in the table on the backend no problem at all, but it doesn't appear in the other front end databases form until the users exit the form and go back into it - it doesn't update live.
Is there a soloution to this.
View 8 Replies
View Related
Jul 28, 2006
Hi Guys,
I'm trying to create a simple form that allows me to enter information about a new customer into my database. I've normalized Addresses into another table. I've attached a stripped down example of my problem to this thread.
Everything works fine when I'm viewing exisitng records, but when I go to add a record, I enter the name and phone number of the company (native to the main form), and go to add the address informaion (native to a subform in the address form), I get a message saying I need a similar record in the Addresses table and I cannot proceed...
But I'm trying to add that record to the addresses table!!
Please guys, whats goen on??!?
View 1 Replies
View Related
Feb 28, 2006
I've been asked if I can create a database which will act as a quote generator.
There will be 5 components to make up the whole product. However, the options available for components 3, 4 and 5 will be dependant on the components chosen for 1 and 2.
i.e. there may be 5 options for each component.
If part 1a is chosen, then only parts 2c, 2d and 2e will be available. If part 1a and 2c are chosen, then only parts 3a and 3d are available and 4b, 4d and 4e are available.
...does any of this make sense?????
My question is... can anyone tell me how I should create the tables and the relationships to enable me to create a database like this. I am completely stumped.
It may be that this is completley beyond me, but i'd like to at least be able to give it a try.
Any help would be appreciated.
Thanks
View 3 Replies
View Related
Feb 17, 2005
I have been trying to create a Quote form in my Database. I have a list of products, each product then has a table that details prices based on quantity breaks (i.e 500 to 999 and 1000 to 1999 etc.).
In my Form I am unable to create a subform in datasheet view that will enable me to select a product from a combo, type in a quantity and for the price to be displayed based on the quantity?
Has anyone managed to achieve this? I would love to see the code and put it into practice.
Many thanks
Nik
View 1 Replies
View Related
Nov 13, 2007
I have a string with one or more double quotes in it. How can I remove the double quotes? (I was able to remove single quotes.)
Example: Purchase "other items". (This the data in a column.)
I want to change it to Purchase other items
View 3 Replies
View Related
Aug 25, 2004
Hi
I am after a MS Access Database that will allow me to do up quotes and invoices for my small computer business does anyone know of any free access databases that will allow me to do this
If you know of any can you please let me know via email matthew01@gmail.com
Thanks
Matthew
View 1 Replies
View Related
Feb 2, 2006
As a basic user of Access I believe I have identified a use for the program for the purposes of a reporting task which I am charged with at the moment. We undertake the weekly tracking of proposals, which involves in brief, the action required for the bigger proposals, the teams involved in writing the proposals and follow up information as well as registration of wins and losses etc.
At the moment we use Excel but I am finding it extremely labour intensive with entries having to be removed and captured by only one person on a weekly basis and when you are talking about 40 to 50 new proposals registered nationally in a week and about 100 updates on existing jobs it becomes a perpetual case of chasing your tail.
Am I right in thinking that if we were to design a simple, effective database with a form design that all our research directors could use with ease, and we could merely run reports off each week that this would not produce a far quicker reaction time when it comes to pooling international resources but also far more effective reporting system with which to produce our management summaries?
I am aware that this will probably require quite a bit of consultation on design but before I go shouting the merits of Access to any of my superiors I wanted to make sure I could be confident of Access's capabilities first?
Can anyone advise? point me in the right direction?
Many thanks!
Lisa H.:confused:
View 2 Replies
View Related
Mar 16, 2008
I am using DoCmd.TransferText to import a CSV file to a new table.
The problem is some of the fields contain quotation marks which really messes things up for me later on.
Is there some way I can go through the whole table and remove them?
Maybe a Query?
Or VBA?
View 9 Replies
View Related
Oct 24, 2013
I am trying to isolate a field with quote marks (").
WHERE (((dbo_AC_ECONOMIC.SECTION)="));
but that does not work..
View 2 Replies
View Related
Jan 3, 2006
ok basically im creating a quote system that will show users prices from one destination to the other destination based on the size of the vehicle..
you can see a similar quote system used on the following website..
http://www.londonairporttaxi.co.uk
there will be three main tables..
Airport Table
airportID - primary key, autonumber
airportNAME - text
the airport table will consist of 5 records..Heathrow,Gatwick,Stansted,London City, Luton
Town Table
TownID - primary key, autonumber
TownNAME - text
the town table will contain a list of postcodes, maybe 50 or so (n1,n2,n3,n4,e1,e2...)
Car Table
CarID - primary key, autonumber
CarNAME - text
the car table will consist of 4 records..Saloon,Estate,MPV,Executive
now what i need to do is create a similar quote system like there is on the url above..
my original idea would be to do something like this..
Have three tables that contain the quotes for each type of car..the first two listed here will work i think..
Airport2TownQuotes Table
quoteID - primary key, autonumber
carID - foreign key from car table
airportID - the airport Pickup, foreign key
townID - the town Destination, foreign key
price - currency
Town2AirportQuotes Table
quoteID - primary key, autonumber
carID - foreign key from car table
townID - the town Pickup, foreign key
airportID - the airport Destination, foreign key
price - currency
however.. for airport to airport quotes.. the resembling table would look something like this..
Airport2AirportQuotes Table
quoteID - primary key, autonumber
carID - foreign key from car table
airportID - the airport Pickup, foreign key
airportID - the airport Destination, foreign key
price - currency
but you cannot place the airport id twice in the same table..(this maybe a case of simply renaming the airport fields in this table such as airport1, and airport2.. but can you still link them and enforce integrity if the fields have different names?)
also one example may be Heathrow to n1 is £30... this does not mean however that n1 to heathrow will be £30.. this is why i need to separate the quotes in this way.. for the 3 possible journeys (airport to airport, town to airport, airport to town).. also the quotes will be different for each car type..
anyway.. i shall be using asp to create a similar quote system on my website.. but i just need to get the final layout of the database sorted.
thanks in advance for any help.
View 7 Replies
View Related
Sep 19, 2006
Hi Folks,
I'm sorry to be stupid, here, but I can't get this to work. I have a parameter query that forms the basis for a report. To get the value for the query, I have a form on which the user selects the value they want from a combo box (cboProgram). The values in the combo box include all of the programs used in the file plus a value called "All" which means - just include all the records. My problem is that when "All" is selected in the combo box, no records are returned.
Things to mention:
"All" has a value of 1 in the lookup table.
I tried the query with the actual values and it works fine. The problem is when I try to do it from the combo box.
My first attempt was to put:
iif([forms]![frmFormName]![cboPrograms]=1, "*", [forms]![frmFormName]![cboPrograms]) in the criteria for that field in the criteria box for lngPrograms.
Access' response was that the criteria value was too complicated to resolve.
So, I noticed that I wasn't saying 'Like "*"' in the first part, but if that's the problem then I can't get the numbers of quotes right. I also tried switching the iif statement around and saying <>1,[forms]..., else some version of 'Like "*", but that didn't work either.
Then I queried around the forum and found a recommendation to make a function to return the value, so I did the following:
In the criteria for the field in the query:
IfAll([forms]![frmFormName]![cboPrograms])
And in a module:
Public Function IfAll(ProgSel)
Select Case ProgSel
Case 1
IfAll = "Like ""*"""
Case Else
IfAll = ProgSel
End Select
End Function
I'm still not getting it. If "All" is selected, value = 1, then no recorsd are returned. Can anyone help me out please?
Gratefully,
-D
View 3 Replies
View Related
Apr 28, 2005
I've been searching all the forums and unable to find my answer. What I want to do is show on a form the average quote for the specific model number.
On the form there is customer info, product info, etc. I want to see the average of what we have quoted every other time we have seen this product (we do repairs). The identifer for the product is the model number, Model#, the quoted cost is PRICE. I've used this function before, DAvg("[Price]","Repairs","[Model#]='013003020'") - which of course gives me the average for one specific model number (013003020). How would I use a similar function but have it do the average for the model number that I am viewing on the form?
If I am able to do that - I also need to find a way to not include nulls and zeros from the Price field.
View 3 Replies
View Related
Jul 8, 2013
I am creating an access database to store customer details as well as quote information. I have created a form to input quote details that our office can complete when a customer calls to complete a quote. I need to create a form that opens as a new form every time we click on the form to input a new quotation. How do I do this? At the moment when I click on the form, the form opens but the details of the last quotation are stored on the open form.
I have no training in access at all and am self taught so far so by no means an expert.I also want to create a form that allows you to search for particular quote numbers, so if someone calls and asks about a particular quote number we click on a page that says 'search quotes', input the quote number and the form opens with all the details of that quote.
View 2 Replies
View Related
Feb 5, 2015
I know that you can insert comments and notes in VBA code using a singular quote, like the following:
Code:
'Comment about what the code does
Is there a similar way to insert comments in the SQL of queries? I found other forum posts that say this isn't possible but those were all for pre-2010 Access. Has this changed at all?
View 5 Replies
View Related
Sep 8, 2014
Any Single line of code available?
View 2 Replies
View Related
May 15, 2014
I am trying to create a form with a button attached to each record that would allow the user to click the button and it would automatically open outlook and fill in the TO:, SUBJECT: and BODY: fields. Here is the code that I currently have:
Code:
Private Sub Command33_Click()
Dim strEmail As String
Dim strMsg As String
Dim oLook As Object
Dim oMail As Object
Set oLook = CreateObject("Outlook.Application")
Set oMail = oLook.CreateItem(0)
[code]...
There are two issues I keep running into:
1. This code opens outlook and populates all of the fields but pastes the email incorrectly. Instead of pasting just the email (email@email.com) it pastes the html tags as well (email@email.com#mailto:email@email.com#) which means that the user would have to delete everything between the #'s in order to send the email every time.
2. I currently have the email BODY pulling from a table but this obviously limits what I can do. I would like to simply encode the BODY within the VBA code. The setup I am looking for is:
one paragraph
a blank line
a hyperlink to a website
a blank line
another paragraph
View 9 Replies
View Related
Oct 18, 2007
Hi, thanks in advance for any help you can offer. I've got a table that has
Date
Time
Tag ID
Power Level
throughout the day a computer listens to several tags (transmitters) and records the power level of the signal generated by the tag each 3 seconds. What I'd like to do is build a query that gives the Date, Time and Maximum Power level reading for each tag ID. I only want 1 record per tag per day
I've tried using "group by" and max in the query but this gives me all the times throughout the day.
anyway, thanks again for looking
cheers, Shaun
View 2 Replies
View Related
Jun 5, 2014
I have a main form with 3 sub forms. The main form is tied to a table called QUOTES_MASTER. The first sub form is tied to a table called QUOTE_ LINE_ ITEMS_DIRTGLUE. It calculates the subtotal when selecting items. The relationship is one-to-many linked on QUOTE_ID.
The second sub form adds up total of all line items and is not tied to a table.The third sub form adds ESTIMATED FREIGHT to the PRODUCT TOTAL and is not tied to a table. how to get the values from the line items form inserted into the QUOTE_LINE_ITEMS_DIRTGLUE table as they are added.
I also want to insert the total value from ESTIMATED DELIVERED into the LINE_TOTALS field in the table QUOTES_MASTER.I tried this code on the product total sub form but it doesn't do anything and there are no errors:
Private Sub PROD_SUB_AfterUpdate()
DoCmd.RunSQL "UPDATE QUOTE_LINE_ITEMS_DIRTGLUE SET QUOTE_LINE_ITEMS_DIRTGLUE.SUBTOTAL = Me.PROD_SUB WHERE QUOTES_MASTER.QUOTE_ID = " & Me.QUOTE_ID
View 6 Replies
View Related
Nov 7, 2006
I need help on this, from what the best concept is, to what I need to look into using:
I store Quote data from phone calls into tblQuotes. There is a seperate table that holds much of the same information except that it is for actual orders called tblOrders.
As far as function goes, I have each working much the way I need it to except for one thing... If a sales person is on the phone with a customer with a quote already in the system, right now they re-enter the data into the Order table. Most times, the order is what was quoted, but maybe with a few small changes (so I will wnt to keep a historical record of the quote). How could I copy the contents of the quote recordset into the recordset for an order, where all the sales rep does from there is edit the quote to the actual order?
Would I use VBA or an update query that is executed via VAB? Honestly, I am unsure how to do this at all, I hope someone has seen this before and has a good suggestion...
Thank you.
View 2 Replies
View Related
Sep 11, 2006
Hey
I am looking for a way to secure a single DB. I would like to be able to use the DB on other PC, but still have user control.
I have found that when using the MS Access User and Ground way will only secure DB's used on the PC it was set on. If i take the DB to my home PC i am not promted for a Password and i can go mad with information i would like to protect.
Am i doing something wrong when setting the security? :confused:
Shot
View 10 Replies
View Related
Jun 12, 2006
i have this qry field that works fine if my formulaID is a NUMBER field.
UomUsageSum: Val(Round(DSum("nz([UomUsage])","[tblFormulaDetail]","[FormulaID] = '" & [FormulaID] & " "),4))
However, i just changed the formulaID to TEXT in my table.
So I think i need different quotes somewhere at the criteria end of this qry calc because FormulaID is now TEXT.
how do i fix this at the end of the field?
thanks
View 2 Replies
View Related
Sep 21, 2004
Ok, as the title suggests I'm having some trouble making a many to many relationship work using a single sub-form. This is really more of a lookup/combo box question if you think about it.
Here is the situation: I have three tables, ComputerPrinter, ComputerComponent, Components
ComputerComponent is actually a joining table between ComputerPrinter and Components, with some extra fields which differentiate a specific instance of a component.
It also has it's own autonumber primary key as one ComputerPrinter can have more then one of the same component (i.e. my boss has two of the same monitors). Its foriegn key to the Components table is a lookup to the ComponentDesc(Component Description) field. (I know a Lookup in a table? He's a witch!, burn him! )
I have a query that Joins the ComputerPrinter table to the ComputerComponent table, and that is the basis of my sub-form (the main form is bound to ComputerPrinter).
This all works, you can select any ComponentDesc and it will add that component to ComputerComponents, thus a many-to-many done through one sub-form (albeit limited). The problem comes in that I do not want the user to add just any possible component, but rather only components that are not in use (i.e. have no computer or printer attached to them). I have a query that gets these components, but when I change the row source of the combo box to just those that are not in use, all the components that are attached to the computer (or printer) that is currently selected on the main form, and that do not have an instance that is not in use (there is no spares in the inventory) disapear!.
This is obviously due to the NotInList property, so by making the bound column the first, and changing it's width to .1 inch, I though that it might work... instead I get just the componentID's (the primary key of the Components field) and the text column (despite have a width of 1") doesn't show up at all (although the drop down shows the text of the not in use components). No luck
Is there a way to show all the component descriptions of the current computer/printer and yet limit the drop down to only those that are not in use? (in a continous form without messing up the other entries that is)
If anyone at least knows if it's possible, I would appreciate the post.
-mwalts
View 5 Replies
View Related
May 31, 2006
Hello,
I have a table on which i must work at row level, one by one.
I put the table into a recordset and i scroll the table row by row from the top until the bottom. The work process - a test - is executed for each row and returns an integer.
I would like to put the process into a function and simply call the function when i move to the next row.
I defined : Function TestScore(ByVal MyTable as Recordset) as Byte
As it is so slow and the results are not always correct, I wonder if the WHOLE table might be passed to the function, and not only the current row.
Does anyone has an idea on passing a single row from a recordset to a function ?
Thanks
View 1 Replies
View Related
Feb 22, 2007
Hi,
On our main menu table, I only want to be able to add one record.
On the form that I have linked to this table, should you press the tab key to go through all the items / buttons, it opens a blank record screen. However, I do not want this. Any ideas?
Thanks in advance
Lee
View 2 Replies
View Related