please help with expot code

Jon123

Registered User.
Local time
Today, 16:53
Joined
Aug 29, 2003
Messages
668
When this code runs the table is exported but not the form???
Code:
    DoCmd.CopyObject "c:\Database1.accdb", "Tble-Singen wetclean", acTable, "Tble-Singen wetclean"
    DoCmd.CopyObject "c:\Database1.accdb", "Frm-Singen wetcleanpage 1", acForm, "Frm-Singen wetcleanpage 1"

any ideas why
 
DoCmd.TransferDatabase

this causes a type mismatch error
Run Time error 13
???
 
DoCmd.TransferDatabase

this causes a type mismatch error
Run Time error 13
???
What are you using for the complete code for the DoCmd.TransferDatabase part? There are several arguments that need to be filled in.
 
Code:
    DoCmd.TransferDatabase "c:\Database1.accdb", "Tble-Singen wetclean", acTable, "Tble-Singen wetclean"
     DoCmd.TransferDatabase "c:\Database1.accdb", "Frm-Singen wetcleanpage 1", acForm, "Frm-Singen wetcleanpage 1"
 
It looks like the syntax is off a bit, but of course I don't have 2007 to test here so this is based on my 2003 code:

Code:
DoCmd.TransferDatabase acExport, , "c:\Database1.accdb", acTable, "Tble-Singen wetclean", "Tble-Singen wetclean"
DoCmd.TransferDatabase acExport, , "c:\Database1.accdb", acForm, "Frm-Singen wetcleanpage 1", "Frm-Singen wetcleanpage 1"
 
Now I'm getting a run time error 2507
The type isn't an installed database type or deosn't support the operation you chose.
 
Now I'm getting a run time error 2507
The type isn't an installed database type or deosn't support the operation you chose.

Are you exporting to a 2007 database from an earlier version?
 
its a blank 2007 dbase nothing in it no forms no tables blank
 
its a blank 2007 dbase nothing in it no forms no tables blank

You are exporting to the blank 2007 db from somewhere. Where does the form and table you are trying to insert come from? Is it from another ACCDB file?
 
Yes I want to export 5 forms and 1 table from 1 database to another database. Then this database can be handed off or over to user 2.

I want user 1 to export and then user 2 will import.


jon
 
The reason I ask is that you would need to be exporting from another ACCDB file and not from an MDB file. If you have to get something from an MDB file you would need to IMPORT from within the ACCDB file.
 
No they are both the same file types. My problem is I need to have users beable to transfer or share data in the field because they almost never have access to internet. So what I'm trying to do is I have a checklist that is broken down into 5 forms each form is like a page and 1 table. When the 1st user opens and starts this checklist they will not get it completed in 1 day so they will need to turn it over the next user. My thinking is they will export it and then copy is to a zip drive and the next user can import it. Is this thought process bad or is there a better way to do this?


jon
 
And they are not on the same network (not Internet)? They are remote of each other? How would they connect to export/import anyway if not connected like that?

If they ARE connected via a network, then just have a backend on the network and give each user a frontend. You may have to modify your table to allow for multiple "checklists" (an assignment field or something) to be able to filter by those tasks assigned to the specific user).
 
Ok so they do access the same network but when in the field they do not have any access to any network. They have a passdown face to face and they have there own laptops. So my thought was if I could make it simple
to save or export to a file they could hand over on a zip drive and then just import it back in might work. I wish they could access a network then none of this would be needed.
 
Ok so they do access the same network but when in the field they do not have any access to any network. They have a passdown face to face and they have there own laptops. So my thought was if I could make it simple
to save or export to a file they could hand over on a zip drive and then just import it back in might work. I wish they could access a network then none of this would be needed.

I think you're going to find that you are going to have a bear of a time managing this. The data will have to be "merged" somehow and that is not necessarily going to be easy. This is a case where Replication would be a nice thing to have (you would need it split and replicate only the backend) and then they could synch daily and that would be much better. But, you can't do that in an ACCDB file. You would need to use an MDB file within Access as the backend. But, the frontends could still be in ACCDB format since they wouldn't be replicated (you never replicate stuff like forms, reports, macros, modules - one quick way to corrupt everything).

I'm sure David Fenton, who is a Replication expert will chime in on this now that I've included the Replication keyword. :D

His site has really good information about this topic and it might be wise to check it out:
http://dfenton.com/DFA/Replication/index.php?title=Main_Page
 
agree but if the users dont have access what can I do. The current mode is they use a word doc. that gets handed back and forth until its complete. Once its complete they turn it in and someone in the office that has a connection enters that data into a database. This process works but its not very efficient and we lose data and end up with incomplete records. So to simplify a bit I thought I could have the user start a checklist complete as much as they can before they day ends then do a data dump the user 2 and so on until its complete.Once complete the data could then be loaded into the main table but not until it was complete.
 
Bob what about doing something list this.

Say I have a main form that has a command button [New Checklist]
and a command button [OutPut open checklist]
and lastly a command button [Input open checklist]

when a user would start a checklist they would select New Checklist this will open the form and start the checklist. At the end of there shift they would click a command button save/update this would save the incomplete record in the table. This user would then click the output open checklist and this would save the incomplete record as a text file on there pc in a set location. They could then give that file to the next user taking over. They would then use the input open checklist and this would copy or append the record into their table and open the incomplete checklist. I think this would work I just dont know how to optput or input the data. I know there are holes and this relies on the users to follow a procedure but that is no different then using excel or word the same issues are there as well.

jon
 
It might work; hard to say really without going down that path.
 
so what would be the best way to output the text file using a command button? If you use the wizard how do you code that to a button?

jon
 

Users who are viewing this thread

Back
Top Bottom