Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

seperating data from database

Status
Not open for further replies.

newnoviceuser

Programmer
Jan 4, 2003
63
US
ok things were doing well. but then i have a problem. everything works fine and i decided to put my databases in a one fileand my vba and queries in another. everything works great except 1 form its a cash sheet form
the error is coming on this command.
rst.Index = "primarykey"
the error says operation is not supported for this type of operation. i need to set the index because the code uses seek which requires the index and i cant get find to work
 
problem #2 since my data seperation the function date() doesnt work in my vba code
I dont know why but it cant seem to find the function. any ideas?

 
Apparently one of your references is not correctly set and thus VBA can not find the function.
 
To check your references, pull up some code and select Tools|References. One of the selected references (at the top) will be marked missign. Write down the name. Unselect it. Click OK. Open the dialog again and find and select that reference.

Jeremy =============
Jeremy Wallace
AlphaBet City Dataworks

Take a look at the Developers' section of the site for some helpful fundamentals.
 
here is the weird part i have a form called sheet it has code in it if I stop the code anywhwere and go to the immediate window and do ?date() it prints an old date if if I copy the entire contents from the sheet form and paste it into a module (test1) under the name of sub sheet() then replace the old code with call sheet() it works just fine. so the program is up and running but i really would like to know why the date() function works ina module but not in the vba of a form.
before i tried to link it, it worked just fine i didnt change the code at all i just copied the table to a different mdb then linked to it. thats when it stopped working. it didnt work so i imported it back. but it continued to not work.
 
Do you have a variable or field named Date? Is the date on your PC correct? My guess is that there's something on the form or in the form's code called "Date" and that's messing things up.

Jeremy =============
Jeremy Wallace
AlphaBet City Dataworks

Take a look at the Developers' section of the site for some helpful fundamentals.
 
yes there is a field called date on the table not on the form. but why would it work for 6 months and not now? i didn't change the code or the structure of the field.
I changed the field from date to sheetdate
but i still get an error
the code is
dim dt as date
dt = date()
and the error says access can't find the field 'date' that is used in your epression. what now?
 
I would change the name of that field. It is important that you not use Access Reserved Words as the names for objects in your databases. I do not know why it worked for a while and doesn't work now, but that's one of the things that happens with object names that match Reserved Words. Try changing the name of that field and see what happens.

Jeremy =============
Jeremy Wallace
AlphaBet City Dataworks

Take a look at the Developers' section of the site for some helpful fundamentals.
 
I did change the name and got the error in my previous post. this is frustrating.
 
i have a mdb on a main computer and i want to access it from another computer but when i do it says can not access c:\... because it is on network drive f: is there a way to make it understand where it is at?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top