Search results

  1. N

    run-time error 424 object required

    Dim orsCompany, oConn Set orsCompany = CreateObject("ADODB.Recordset") Set oConn = CurrentProject.Connection ' within current project therefore no need to open connection Dim branch As String, zipcode As Long, tempdistance As Double orsCompany.Open "select * from [ZipCodesUSUnique];", oConn, 3...
  2. N

    how do you check to see if field exists?

    Thanks! It worked great.
  3. N

    how do you check to see if field exists?

    I know this must be very easy I just can't find it. Isdefined, isNull I thought might work but didn't. Does anyone have any idea how I can check to see if this table exists before I alter the table? Thanks so much! Sam If (orsCompany("Pricing")) Then orsPricingField.Open...
  4. N

    Alter table by adding columns as the first three fields

    Interesting problem with my database Currently I alter a table by adding three fields to it but now I need these three fields to be added as the first three columns instead of at the end. How can I do this dynamically? Is there a field property in Alter that allows me to change the order? I...
  5. N

    How to I check to see if a field exists in a table using VB?

    Yup, that was exactly what I thought, but I just wish I could have figured it out the other way. It seems like relying on the on error mechanism isn't the strongest solution...but i was tired of being stuck :) Thanks for the help!!! I couldn't get through this project without y'all!! Sam
  6. N

    Change Data type and name

    I allow the user to import a file where they select the name of the table and location of the excel file. I need to add a few more lines of code that check to see that there is a zip code field and that its data type is a number field Here is the basic idea, but I am so new to vb script that...
  7. N

    User definined filename for DoCmd.TransferSpreadsheet?

    Thanks!!!!!!!!!!11 Pat, Thanks so much!!! I was thinking I needed to custom code adding a blank table with field definitions and then update this table.
  8. N

    How to I check to see if a field exists in a table using VB?

    If FieldExists(Me!Combo2, "Branch") = True Then DoCmd.RunSQL ("ALTER TABLE " & Me!Combo2 & " DROP COLUMN Branch ;") End If Yes, I know I keep looking at it thinking it will look. Another weird thing is that in debug mode if I roll over this if statement, the little popup says TRUE =...
  9. N

    How to I check to see if a field exists in a table using VB?

    I am having a problem with this code. It always returns False. I am using Access 2000. Any ideas? For Each fld In CurrentDb.TableDefs(tableName).Fields If fld.Name = fieldName Then FieldExists = True Next
  10. N

    User definined filename for DoCmd.TransferSpreadsheet?

    yes, but I need it dynamically :)
  11. N

    How to I check to see if a field exists in a table using VB?

    How to I check to see if a field exists in a table using VB? I want to run DoCmd.RunSQL ("ALTER TABLE " & test2 & " DROP COLUMN Branch Distance;") but the field may not exists in all cases.
  12. N

    Query database for the names of all tables

    Thanks!!!!! Thanks your everyone's help! Everything works great. To answer jon's earlier questions: The tables do not have the same fields, instead I run two queries: One query adds 5 fields and then the second (the one everyone helped me on) populates the fields. I do have 1 more questions...
  13. N

    Query database for the names of all tables

    I don't know the name of the table until they select it in the combo box. Which is why I was referencing the combo box.
  14. N

    Query database for the names of all tables

    Thanks and now Im on to the next step! Thanks..but now my second query is having issues. They can select the table in the combo box, but then I want to update this table with several pieces of information. How do I reference the combo box in my second query. I know this is wrong..but i will...
  15. N

    Query database for the names of all tables

    I am trying to make a combo box that will list all the table names in my db. I have no idea what I need to do. Thanks!!! I really need your help!!!
  16. N

    User definined filename for DoCmd.TransferSpreadsheet?

    Additional Question Is there a way to create the table according to the Excel fields and then import the file from excel? My excel files will never have the same fields. Thanks
  17. N

    How do I update a Calendar with dates?

    More info One more thing. Events can and will overlap, but I just want to be aware of them and I dont know the best technique. Again, I thank everyone for their ideas!
  18. N

    How do I update a Calendar with dates?

    Clarification The dates are entered in the Table: Event as BeginDate and EndDate. What I mean by overlap is if Event 1 starts 12/3/04 and ends 12/6/04 and Event 2 starts on 12/5/04 then Event 1 and Event 2 would overlap. Thanks for the interest!!
  19. N

    How do I update a Calendar with dates?

    I have a db which holds event dates, and I need a way to be able to tell if any dates overlap? Any ideas?? Thank! - SAM
  20. N

    Help with reports

    Thanks in advance for everyone's help. I create two reports in access report 1 with detailed information (company name, info, status, details etc) report 2 is an outline form of report 1 with company name, status, and a link that I want to directly into the report 1 I publish both forms...
Back
Top Bottom