User Profile

Collapse

Profile Sidebar

Collapse
janders468
janders468
Last Activity: Nov 20 '09, 03:47 PM
Joined: Mar 15 '08
Location: Firestone, CO
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • bapi2009
    bapi2009 posted a Visitor Message for janders468
    you just insert record in a row and dont blank the primary key field..... u can insert properly record using this way
    See more | Go to post

  • janders468
    replied to Auto Date in form "pages"
    What does the error message say?
    See more | Go to post

    Leave a comment:


  • janders468
    replied to Auto Date in form "pages"
    You can create a variable that holds today's date when the form opens. Then whatever triggers a new record or page change can increment this variable i.e.
    Code:
    dim dte as date
    sub form_open
         dte = date
    end sub
    
    sub newpage()
         dte = dte + 1
    end sub
    If today's date is too general as a starting point you can populate the variable from wherever you are storing the dates...
    See more | Go to post

    Leave a comment:


  • janders468
    replied to Access not inserting records properly
    Could you clarify this a little, I'm having trouble following exactly what it is you are doing. You mention that you have to loop through a file and then go on to call it a table as far as I can tell. Are you ultimately needing to deal with a file or tables. What are all the fields in those tables? Is it that you have field full of id numbers and if you come across a certain number then a blank should be appended after that number (within the...
    See more | Go to post

    Leave a comment:


  • janders468
    replied to Auto Date in form "pages"
    This depends on what you mean by change page, and how you are doing that. It sounds like you need to respond to whatever event a page change is and populate the appropriate control or record with today's date. the Functions Now or Date will return today's date. If you add a few more details we can probably zero in on what you need.
    See more | Go to post

    Leave a comment:


  • janders468
    replied to Copy worksheet not working
    I tested this in xl 2003 and assume it is the same. You need to invoke the copy method of the chartobjects, not the sheet itself. Such as:

    Code:
    Excel.Worksheets("Sheet1").ChartObjects.Copy
    Excel.Worksheets("Sheet2").Paste
    Might be a better way but that will copy the chart object
    See more | Go to post

    Leave a comment:


  • What does it return in the query?
    See more | Go to post

    Leave a comment:


  • janders468
    replied to select field names
    If you want to return the field names as the result of a query i.e. if you have a table with Field1, Field2 and you want to return something like:

    Fields
    Field1
    Field2

    I don't know of a way to do that using a query. You would have to use a recordset or some other mechanism to do the transposition. It's possible, and not that difficult, but it cannot be done with SQL alone.
    See more | Go to post

    Leave a comment:


  • Yes, for every class if you include this sub it will run on instantiation of the object:
    Code:
    Private Sub Class_Initialize()
       'Do whatever here
    End Sub
    Unfortunately vba doesn't offer method overloading so you can't easily pass arguments to the constructor, but it has a limited ability to do what you are after.
    See more | Go to post

    Leave a comment:


  • janders468
    replied to Autofilling a form with default values
    The easiest way to do this depends on how you are entering the data. If the form is bound to the underlying table then I would set the default value property of the relevant fields to the relevant names (in the underlying datasource). That way any time a record is added it will be populated by the database. However, if you are using the input values as part of a query (i.e. you append those values as a record in the table) then you can either...
    See more | Go to post

    Leave a comment:


  • janders468
    replied to Calculate difference in times in seconds
    Thanks Linq,

    I was posting in the event that you were interested in finding the absolute value for the duration of tasks you complete before you begin. Thanks for the correction, foolish mistake on my part.
    See more | Go to post

    Leave a comment:


  • janders468
    replied to Running access query in Vb.net
    Right now you are attempting to automate Access, which doesn't get you where you want to go because you're trying to put the application logic in vb.net. In other words what you want access to is not the Access objects, but the Data objects. To do this you will need to read up on ADO.net, the data connection API provided by the .net framework. In your case you will want to use OleDb. This gives you the ability to pull data from a table (or query)...
    See more | Go to post

    Leave a comment:


  • Opening Mdb bypassing AutoExec with C# Solved, but curious about why solution works

    Hi,

    I have been messing around with automating Access (I am attempting to actually manipulate the Access objects themselves so it requires going beyond data access) from a c# program (long story as to why, but any how...). I am dealing with databases that all have AutoExec macros within them which automatically run when the database opens, which I don't want the database to do. In Access this is bypassed by holding down the shift...
    See more | Go to post

  • janders468
    replied to Text Box to Table
    Let me know if you have questions, there are several simple things that could cause this to fail, so if it doesn't work we can certainly work through that.
    See more | Go to post

    Leave a comment:


  • janders468
    replied to Text Box to Table
    Using a parameterized query makes this difficult, but typically if all you are returning is one value then I find a dlookup the best way to go. A dlookup takes two required parameters and one optional. The first is the field that contains the value you are interested in, the second is the table or query the field is contained within, and the the third is an optional criteria, it then returns the value from the field you specified in the first argument...
    See more | Go to post

    Leave a comment:


  • janders468
    replied to Text Box to Table
    I should also have asked, what field are you interested in populating the textbox with?
    See more | Go to post

    Leave a comment:


  • janders468
    replied to Calculate difference in times in seconds
    I would check out the DateDiff function built in to access for example to calculate the above would be:
    Code:
    DateDiff("s", #09:05:00#, #09:00:00#)
    This will return -300 (absolute value is 300 seconds), the 's' tells it to do the return result in seconds, there are other parameters you can give but the help files explain much better than I can so I'll leave that to you. Also, I changed the problem slightly because...
    See more | Go to post

    Leave a comment:


  • janders468
    replied to Converting EOMONTH to Access Query
    I am unfamiliar with EOMONTH, is this a built in function (I am assuming you are using Excel?). We'll need a little more information to try and figure out what your requirements are. i.e. what are the inputs and the expected outputs of this function?
    See more | Go to post

    Leave a comment:


  • If you go into the form properties under the format tab is a property titled 'Navigation buttons' set this to no and they should go away.
    See more | Go to post

    Leave a comment:


  • You are not signifying your where clause as a where clause it should read:

    Code:
    DoCmd.RunSQL "DELETE * FROM Budget_Planner_SubDatasheet WHERE CompanyStore = 'Begining Balance';"
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...