Whats Going Wrong

Jul 3, 2007

I am trying to do a partial duplication query. this is the code from the SQL view in access
SELECT filtered1.Company_Name

FROM filtered1

WHERE (((filtered1.Company_Name) In (SELECT [Company_Name] FROM [filtered1] As Tmp GROUP BY [Company_Name], Left([Company_Name],7)

HAVING Count(*)>1 And Left([Company_Name],7) = Left([filtered1].[Company_Name],7))))

ORDER BY filtered1.Company_Name;

the table filtered1 has 1300 records, under the field Company_Name.
the 7's apparently should get it to compare the first 7 letters, and if the same show me them.

A whats going wrong, its not showing me any, asthough there are none, (which i know there are) and
B. How would i get it to compare the first 7 letters across tables, with fields of the same name?

thanks
alex

View Replies


ADVERTISEMENT

Whats Wrong?

Jan 19, 2005

Private Sub Save_Click()

Dim sSemester As String

sSemester = Semester1.value

DoCmd.RunSQL "INSERT INTO Hours (Semester) " & _
" VALUES('" + [sSemester] + "'); "

End Sub

keep getting syntax error
basically Semester1 is a text box with an input mask : LLL???" '"00;0;

View 6 Replies View Related

Whats Wrong?!

Feb 25, 2005

"Microsoft JScript runtime error 'null' is null or not an object line = 126, col = 7 (line is offset from the start of the script block). Error returned from property or method call." what does that mean?

View 1 Replies View Related

Whats Wrong With This Formula?

Oct 23, 2005

As state above that whats wrong with the following formula?

=iff([Product]=Home,1,0)

:confused:

View 2 Replies View Related

Whats Wrong With This Sql Statement?

Sep 1, 2005

SELECT Fields
FROM table1 RIGHT JOIN table2 ON table1.Pubid = table2.PubID
WHERE (table1.PubType=[Forms]![frmCirculationByTitle]![comMemberType] Or [Forms]![frmCirculationByTitle]![comMemberType] Is null)
AND (table2.lAuditPeriod=[Forms]![frmCirculationByTitle]![comStartPeriod] Or [Forms]![frmCirculationByTitle]![comStartPeriod] IS null)
And (table2.lAuditPeriod=[Forms]![frmCirculationByTitle]![comEndPeriod] Or [Forms]![frmCirculationByTitle]![comEndPeriod] is null)
AND (table2.Unfinancial=[Forms]![frmCirculationByTitle]![chkCurrent] Or [Forms]![frmCirculationByTitle]![chkCurrent] IS null);

even if i only have one parameter (a member type, which should bring back at least 20 for each type of member) it returns nothing. if i do the same sql statement in a query and hard codee the value in i get data. it seems to be ignoring whatever is on the form.

*shrug*

%simon

View 2 Replies View Related

Whats Wrong With This Query?

Aug 15, 2006

trying to create a table using a query, and I'm not sure whats wrong with this query:

CREATE TABLE FYIAdmin
(
FYI_ID COUNTER CONSTRAINT PRIMARY KEY,
FYI_Title varchar(100),
FYI_Text memo,
FYI_Date date
)

Sorry it its noobish :(

View 2 Replies View Related

Whats Wrong With This Code

Jul 11, 2006

I placed a combo box named CboSearchItem on form to select and bring the record onto the form. Its working smoothly.

Set rst1 = CurrentDb.OpenRecordset("Select * From Product_Master " & _
"where Productname= " & """" & CboSearchItem & """")

But when data in field 'ProductName' contains " mark, it produces error 3075 :

Syntax error in string in query expression "ProductName = "Hose White 3/4"'"

When I replaced all " mark from the data / record, it works fine.
For example Product Name are as follows:

Elbow 2 Way
ABC Pipe 3"
Shower Pipe 1 1/5 Meter

Reading all the above record but not the second one because it contains " mark.

I can not tell my client not to use " symbol while entering the product name. There should be a solution.

Please extend your help.

With kind regards,
Ashfaque

View 6 Replies View Related

Help Needed Urgently - Whats Wrong In This SQL Statement

Mar 11, 2006

SELECT (Max(ReferenceDescription.ReferenceID))
FROM (ReferenceDescription)
WHERE (ReferenceDescription.ReferenceID >= (ReferenceDescription.CategoryID * ReferenceDescription.DepartmentID) AND ReferenceDescription.ReferenceID <= (INT(ReferenceDescription.CategoryID * ReferenceDescription.DepartmentID * 0.9999))

View 1 Replies View Related

Whats The Best Way To Do This?

Jun 13, 2007

Hello,

I have a database which every week I have to import an excel spreadsheet. Now this spread sheet will always have rows that repeat and will have somewhere between 700-1500 rows.

What is my best option to delete the rows that repeat? Meaning if a rows 1-10 have the same data then delete 9 of them. It will vary but I only need the unique record and the others can be deleted.

Would this be best way using a query? VB or something else?

There are 6 columns that will always be in the spreadsheet with the same column names:

ACCT_NUMBER
SHORT_ACCOUNT_TITLE
CONTACT_COMMENTS
CONTACT_TYPE_TEXT
ENTERED_BY
INITIAL_CONTACT_DATE
DATE_ENTERED

There will be rows that will repeat on every spreadsheet everytime. The only column that will not repeat will be CONTACT_COMMENTS. This column is needs to be deleted everytime.

I guess I didnt know if when I import the spreadsheet if something was possible that would:

Delete the CONTACT_COMMENTS then delete the duplicate rows upon importing or even after since this will have to be done everytime.

Thanks.

View 4 Replies View Related

Whats Your Price?

Jan 2, 2006

After being a member on this site for a while now I would like to get some opinions on "cost of application development" I know the forum covers a wide geographic area and the members cover a wide spectrum of degrees of expertise on Access and application development. So the question is this..What would your rates be and how would you determine your charges for developing Access applications for a business?PS... Please include your location if not in your profile.

View 13 Replies View Related

Whats Your Thought On This?

Aug 30, 2004

If I am going to get a Invoice/Statement programme made for me should it be in MS Access or Visual Basic, Thanks for your thoughts, Bob Vance

View 2 Replies View Related

Whats Controlling These Decimals?

Jan 5, 2007

Hello,

Dont understand what is controlling these decimals. I dont need any decimals for this database. The currency is talking bout money in 1000's and the probability is whole numbers.

Here is where I cant get the decimals to stop:

http://img80.imageshack.us/img80/3685/untitled2pl2.png
http://img77.imageshack.us/img77/6276/untitled3pa6.png
http://img208.imageshack.us/img208/2047/untitled3lk8.png

I have tried different things but no luck...anyone have any suggestions.

Thanks.

View 10 Replies View Related

Whats Better For Database Design?

Aug 17, 2007

I need to store a question like...

I felt scared...
[]Before I was on the roller coaster
[]When I was on the roller coaster
[]After I was on the roller coaster

I need to be able to query/search the database for people that were scared "before", "during", "after", "before and during", "before and after", "during and after". Then I can categorize these people. What would be the best way to do it? Should I have 3 "yes/no" fields in my table, or one text field with those 3 as the lookup field? What one would make organizing the people easier? :D Thanks!

View 7 Replies View Related

Whats Better For Database Design?

Aug 17, 2007

I need to store a question like...

I felt scared...
[]Before I was on the roller coaster
[]When I was on the roller coaster
[]After I was on the roller coaster

I need to be able to query/search the database for people that were scared "before", "during", "after", "before and during", "before and after", "during and after". Then I can categorize these people. What would be the best way to do it? Should I have 3 "yes/no" fields in my table, or one text field with those 3 as the lookup field? What one would make organizing the people easier?

View 1 Replies View Related

Switchboard Whats The Real Advantage?

Jan 25, 2007

Hello,

My database is due tommorrow and my switchboard has gone crazy on me, it doesnt work anymore. When you scrolll your mouse it then goes through the links thats the only way to get to the section you want.

So question is this, whats the advantage of using it?

Cant I just set some hyperlinks to the items I want and it would be the same. Wondering cause dont know if I should spend time trying to fix it or just make hyperlinks...and its due tommorrow.

Thanks for any opinions.

View 12 Replies View Related

Whats The Difference Between Frontend And Backend Database

Jun 22, 2006

Hi people,
Does anyone knows the difference between frontend and backend database? I look 4ward to hearing from any database expert.

black85

View 1 Replies View Related

Now Its All Gone Wrong!!!

Sep 21, 2005

Ok Guys,

Here goes...

all of a sudden now, when i open my form, its not displaying any of the previous data that i stored in it!! All the data is still in the table, and when i add data it goes into the table!! I checked properties and the record source and everything is ok there, what have i done wrong guys...HELP!!!!

View 3 Replies View Related

What's Wrong?

Jun 9, 2006

I purchased a copy of Office 2003, on Ebay, for less than half the price it normally sells for. I created databases, which work well on my computer. However, when I copy them over to the office computer from my computer, via Flash memory stick, the program does not run. The message seems to indicate a problem with registration. When I installed Access, it asked me for a registration key, which I did provide. After that it worked-not activation process. Does this mean that you can only use the computer you created the database on to run it, or that I do not have a proper version of Access 2003? I cannot transfer, from my home computer, to the office computer. Is this Microsoft paranoia again?
Subsequent uninstalls and reinstalls of the program did not ask for the installation key.
What should happen? I would like to resolve this major problem and your help will be greatly appreciated. The program is flaky. Also, Switchboard does not work-must use Option Box.

These questions most user must know about initial installation and copying mdb files to other computers -please reply.

View 2 Replies View Related

What's Wrong

Oct 16, 2006

Hi,
Can anyone tell me what's wrong with this:
DoCmd.RunSQL "INSERT INTO tblPersoaneJuridice (Denumire,Localitate,CodUnicInregistrare,NumarInre gistrareRegComertului,Telefon,Fax) VALUES ('" & Forms!frmPrincipal!subfrmTipVersus!txtDenumire & "','" & Forms!frmPrincipal!subfrmTipVersus!txtLocalitate & "','" & Forms!frmPrincipal!subfrmTipVersus!txtCUI & "','" & Forms!frmPrincipal!subfrmTipVersus!txtNumarInregis trare & "','" & Forms!frmPrincipal!subfrmTipVersus!txtTelefon & "','" & Forms!frmPrincipal!subfrmTipVersus!txtFax & "')"
cui = DLookup("[CodUnicInregistrare]", "[tblPersoaneJuridice]", "[NumarInregistrareRegComertului]='" & Me!subfrmTipVersus!txtNumarInregistrare & "'")

i have a string variable denoted by cui and i need it to take value from table tblPersoaneJuridice from field CodUnicInregistrare. CodUnicInregistrare and NumarInregistrareRegComertului is text.

View 3 Replies View Related

Would Someone Tell Me What's Wrong With This

Jun 14, 2007

Have not coded for about 5 years and need a little refresher. Can't remember what I need to do. Thanks

Dim SelectedCompany As String
Dim rs As ADODB.Recordset
Dim Cn As ADODB.Connection
Dim sSql As String

Set rs = New ADODB.Recordset
Set Cn = New ADODB.Connection

SelectedCompany = Me!cboCompanyName.Text

sSql = "select Customername, AddressLine1, AddressLine2, AddressLine3, AddressLine4, AddressLine5, AddressLine6 from customers where "
sSql = sSql & "CompanyName = '" & SelectedCompany & "'"

rs.Open sSql, Cn, adOpenStatic, adLockReadOnly

this last line fails with error "No value given for one or more required parameters."

The code is executed when someone selects something in a combo box on a form in an access database.

Thanks

Pete

View 4 Replies View Related

Am I Doing This Wrong

Oct 4, 2007

I think I'm just tired, and not seeing what to do here.

I have my main table.

MainID PK
bunch of other fields...

I also have a 'created by table'.

Createdby_ID PK
User ID
Main ID
Date_created.

I also have a user table, with a list of all the users.
User_ID PK
User_Name.


Is this the right way to setup these tables?
Only 1 person can create any paticular record.

I want it to be required tha whoever creates the record selects their name and dates it.

View 11 Replies View Related

What Is Wrong Please Help

Dec 13, 2005

strSQL = ("SELECT onespace2(MeetingMinutes!MinutesID, '.' ) & " - " & [MinutesTitle] AS Item, MeetingMinutes.MeetingCode, Minutes.*, MeetingMinutes.MinutesCode, MeetingMinutes.MinutesID ")
strSQL = strSQL & ("FROM Minutes INNER JOIN MeetingMinutes ON Minutes.MinutesCode = MeetingMinutes.MinutesCode ")
strSQL = strSQL & "WHERE MeetingMinutes.MinutesCode= " & MinutesCode & " AND MeetingMinutes.MeetingCode= " & [Forms]![MinutesMFnew]![ComboMeetingNav] & ";"

cant get it running.
i got the same query running made in the querybuilder, but somethings change, so i need to adjus it in vba. But it doenswork, and get a type error

please advice

View 1 Replies View Related

What Is Wrong With This SQL?

Jul 13, 2007

DoCmd.RunSQL "INSERT INTO tblAccessLog " _
& "(DateLoggedOut, TimeLoggedOut) VALUES " _
& "(#" & Date & "#,#" & Time & "#) WHERE " _
& "(LogID = '" & LogsID & "');"

Could anyone possibly tell me why this isn't working? Probably something stupid i've done bus still.

When i run it, I am getting the error message "Query input must contain at least one table or query" yet i've told it to use tblAccessLog so i'm just confused.

Thanks

View 8 Replies View Related

What Is Wrong With This SQL?

Aug 14, 2007

StrSQL = "INSERT INTO LV (Directory_Name:,Filename:, Total_Files,Total_Records:,Total_Batches:, Total_YH) VALUES ('" & DirectoryName & "', '" & FileName & "', TotalFiles , TotalRecords , TotalBatches , TotalYH);"

Have tried loads of combinations of the " ' and ' " to get it working but just keeps giving me the damn syntax error!!! :mad:

What's wrong with it? Thanks

View 2 Replies View Related

Anything Wrong With This Sql

Oct 11, 2007

strSQL = "INSERT INTO TBL_History (Filename, Agent, SentRecieved, Accepted, Notes) VALUES ('" & [Forms]!FRM_ImportSubmission.submission_filename & "','" & [Forms]![FRM_ImportSubmission]![cboAgent] & "','Recieved','True','');"

CurrentProject.Connection.Execute strSQL

i've posted it as the sql string is built in the code

i get a 'catastrpohic error' when running it from vb like this and when i build put the string into a query and run it through the access user interface it worrks

View 14 Replies View Related

Where Have I Gone Wrong!!

Oct 23, 2007

I made a number of changes to a DB that was working fine (normalised further). So what's wrong? I have a number of forms (for my sample DB I have stripped down to just one, if I can resolve for this I can apply to others).

qryENTRY_COMPUTERS
ENTRY COMPUTER FORM

The user adds a new computer then selects the Computer Make (qryLOOKUP_COMPUTER_SUPPLIER) & Computer Model (qryLOOKUP_COMPUTER_MODELS).

This now returns error 'recordset is not updateable'.

The query on which the form is based is incorrect (qryENTRY_COMPUTERS). Previously I was able to add tblSupplier & tblSupplierProducts to the query then add field ProductDescription fom tblSupplierProducts to the query. This allows users to select a value from cboComputerModelID (ProductID), field ProductDescription then displays the related descriptive value for the ProductID selected (value remain on screen when user naviagtes between records.

I have attached a sample database (access 2002-2003 format).

I am sure the answer is staring me in the face but I have now spent hours trying to resolve!!

Help very much appreciated.
Phil.

Update: One difference I can see is that on the query 'qryENTRY_COMPUTERS' where i have added tblSupplierProducts & tblSupplier the join properties are in reverse i.e. Left Table Name = tblSupplierProducts Rigth Table Name = tblComputers Left Column Name = ProductID Right Column Name = ProductID ????

I can't edit this.......................

View 14 Replies View Related







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