Two Logical Problems?

Aug 26, 2007

Hi,

I’m using MS Access 2000 – I’ve been building, using and updating an Access database for a while now, and I’ve been living with two problems that are causing problems to its use.

The first problem appears minor, but relates to the second problem….
I keep the database in my shared documents folder on my PC, so a colleague and I can both use it at the same time.

When we have the same form open – if I click on the “save” icon it comes up with an error “you do not have exclusive access to the database at this time” and the recordset that I am working on cannot be saved. This is causing problems because if I enter fresh data into the form, and then click a command button to run a query against it, it comes back with blank results because it has not been saved to the table yet – so I have to exit out of the form so it saves the data, then go back into the form so the query runs properly.

Are there any settings I can apply so I can save the data to the table without having to exit and re-enter the form again?

The second problem is more difficult and has had me tearing my hair out for a very very very long time – if anyone could help me with this problem I would be indebted to them…

After I’ve entered all the data into my form, I need to export/transfer 4 of the fields to a .csv file.

I would have thought that the logical thing to do would be to have a command button that performs a macro, which it turn;

Saves the data to the table
runs a query which selects the 4 fields I require
then exports the Query’s results to the csv file.

When I’ve tried this, obviously the problem of saving the data remains, but even when I exit out of the form and re-enter so the data has been saved to the table – I can’t get the export to work!

I’ve tried exporting the query manually from the query view, however it comes up with an error stating that “TOO FEW PARAMETERS. EXPECTED 1”
I’ve tried Macros that “Outputs to” and “Transfer Text” – however I can’t get any of them to work. I managed to export a table and save the export procedure, then tried to use this procedure when exporting a query, but again I couldn’t get this to work. I’ve also tried adapting VB codes that have been posted on this forum before, however as I’m not too hot on coding I’m not sure whether I’ve been making mistakes or if there is something wrong with the architecture of my database that is preventing the export from working.

Would anyone be able to take a look at the database for me please? I’ve uploaded it here – http://www.qualitytoolsltd.co.uk/accessdatabase.zip - I’ve deleted everything except for the tables, queries and forms that rely on the export query.


It contains a table (“Orders”) that stores the form’s data, a query (“QuotefromorderstblQuery”) that filters our “Quotes” from our “Orders” (I keep “Quotes” and actual “Orders” in the same table but have a [Quote/Order] field that distinguishes them apart), and a form (“QuoteEntryForm”) that is linked to the query to show our Quotes.

Also included is the query (“exporttocsvquery”) that I am trying to export to a csv file. On the form there is a command button called “Run CSV Query” that runs the query – but I’ve deleted all the various buttons and code that I’ve tried to get it to export to avoid confusion.

Also on the form is a button called “Process Order” – this can be ignored as clicking this just changes the [Quote/Order] status to “Order” and the recordset won’t show on this form anymore.

If anyone could please try and help me understand how to overcome these problems – I would be extremely greatful!

The four fields that I am trying to export are;
[Customer Name],[Customer Address],[Customer Postcode] & [Total Selling Price inc VAT] – I have highlighted them with red text on the form

If I can solve the first problem of saving, what I am trying to achieve is the creation of a Macro, which is programmed to:
1.Saves the data to the “Orders” table
2.Runs the “Exporttocsvquery” using the Order ID as the select criteria , so it shows the current records being displayed on the form as the query’s results.
3.Exports the Query results to a .csv file on my hard drive.
4.Launch a custom application that I’ve programmed to run using the data in the .csv file.

Thank you very much for taking the time to read this marathon post. Any help, advice, guidance, anything at all would be appreciated very much indeed.

Thank you again.

Dean Rowe.
deanrowe [at] qualitytoolsltd.co.uk

View Replies


ADVERTISEMENT

Unsure Of Logical Operators

Dec 6, 2006

Hey

Can someone answer me if Like "Red" and Like "Blue" Or Like "Red" is a logical operator?

Thanks for the help

View 1 Replies View Related

#Error And Logical Test

Dec 27, 2006

Is there a way of doing a logical test to see if a filed has a "#Error" instead of a value?

If so what is the expression and syntax?

View 3 Replies View Related

Logical Diagram - Plsssss Helpppppp

Jun 4, 2006

hi everyone, this is first post, i have this task and i think i have the solution but im not sure, so plsplsplspsssssssss someone help!!!!
its called class scheduling. below is the physical model. i need to make the logical, i have been told that course and section share a many to many relation as well as section and faculty and also bwee/ faculty and course, thus the creation of the intersection tbl, the OFFERINGS TABLE. i have inserted the foreign keys (FK's) into that table (which are the primary keys for the 3 main tables). what i need to know is that:
1. do i need anymore FK's?
2. wen i make my logical diagram, do i show it like the way i have shown it in the word file? i made it as such that course and section have the PK of the 2 tables and are now FK which allow duplication ie 1 course can have many sections etcc pls helpppppppppppp


Courses table
CourseID (PK)
Title
Credits

Sections table
SectionsID (PK)
Days
Time

Faculty table
FacultyID (PK)
Firstname
Lastname
department
Title
FullTime or partime
hiredate

Offerings table (intersection table)
OfferingID (PK)
CourseID (FK)
SectionID (FK)
FacultyID (FK)
Building
Room

View 1 Replies View Related

Continuous Forms & Logical Tests

Oct 5, 2005

I have a continuous form, that displays in the body the results of a number of selections from a previous form.

In the header I have a message that I want to either shown or hide depending on the result of the following code in the "On Current” event;

Private Sub Form_Current()

If Text29.Value = 0 Then
Label32.Visible = False

End If

End Sub

The default form Label32 is for it to be visible. Text29 is unbound and derives it's value from "=Min([WareHouseID])-Max([warehouseid])" no problem there.

The problem is that test does not perform as I expect it to. I have tried all sort of combinations and permutations but can not get it to respond correctly. It seems to think that Text29.Value is equal to zero regardless of the result it is showing

I'm guessing that there is something about continuous forms I have not yet learned :(

View 3 Replies View Related







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