Recent content by YevS

  1. Y

    Function in Query won't return Value

    you need to make sure that dt = DateValue(month_plus_time & "/" & month_day & "/" & year_plus_time) returns a valid date, I'm guessing its not.
  2. Y

    datediff function

    Just make another query on the crosstab you made. His function has too many brackets. (DateDiff("m",[Stage1],Nz([Stage2],[Stage1])) should be DateDiff("m",[Stage1],Nz([Stage2],[Stage1])) query 1 = crosstab query 2 = find the time between stages with datediff (check for nulls if you have to...
  3. Y

    How do I display module results in a form text box

    posted wrong stuff... It seems you are converting only mod 10 command... You should Mod 10 the date not the results of your function. Forms!RequestForm!JulianDate = Year(Forms!RequestForm!ReqDate) Mod 10 & CDate2Julian(Forms!RequestForm!ReqDate)
  4. Y

    from Access to Excel

    this code is run in access? If so, have you tried the docmd.TransferSpreadsheet command? Or even the TransferText...
  5. Y

    datediff function

    Why dont you just make a crosstab query?
  6. Y

    Q: Horizontal Slider Control on SubForms

    You want the users to be able to "stretch" those bars? If not, I dont quite get why you are doing it in sub-forms. You could run code on "current" event of the main form that changes each bar to simulate child links in the back end using recordsets. It's hard to see what you are trying to do...
  7. Y

    Sclar-valued Function & access VB question

    Hi, I'm trying to get a return value from an Scalar-valued function in an SQL server into access. function is as follows: CREATE FUNCTION [dbo].[SQLStr] () RETURNS nvarchar(2000)AS BEGIN Declare @SQL nvarchar(2000) Set @sql =N'SELECT...' return @sql END GO and I'm trying to call it like...
  8. Y

    Importing data - browsing for file

    Re: Importing data - browsing for file(New Easier Way) Thanks CraigWarmy, was looking all over for this! This Works with "Microsoft Office 12.0 Object Library" (I dont have office 11 for some reason) Here is my code (copied & slightly modified): Function GetFileLink() As String...
  9. Y

    Is there a way to specify an object via name?

    Ah I was trying with the dot... me.("level" & i) Thanks :)
  10. Y

    Is there a way to specify an object via name?

    I'm trying to find a way to manipulate specifically named objects on the form via name. Currently Ill run code like this to find every object: Function (i as Integer) Dim MyObject as Object For Each MyObject in me.Controls If MyObject.Name = "Level" & i Then...
  11. Y

    2 copies of code, 1 works one give readonly db error

    Your table is probably locked by your form as read only. Make a query for the table and export that instead.
  12. Y

    Stuck: Searching Controls for a specific control name and changing the control value

    The issue is not the storage or the retrieval of the data, its finding the controls to put the data in... I cant figure out how to grab a control and set its value without having to pass the control name via another event. I'm trying to set values for 8 x 3 controls in 1 event with a loop. I...
  13. Y

    Stuck: Searching Controls for a specific control name and changing the control value

    Hi, Ive been trying to get a piece of code out that dynamicaly looks at several controls at a certain "level" and sets the controls on the "levels" below to a value that the user has chosen on the first level... I'll try to explain: The user has 8 levels of data, the first level choise...
  14. Y

    Update query

    This should help. Function UpdateIDQry(ID As Integer) As String Select Case ID Case 3 UpdateIDQry= "Update.....orders1.customerid = 124 .... Where Customers.afid=3" Case 4 UpdateIDQry= "Update.....orders1.customerid = 320 .... Where Customers.afid=4" Case 5...
  15. Y

    Graphical Representation on each Row

    Well, thats tricky. The probelm is, once you start changing properties of an object on a continuos form it refreshes that object for every row. So the only way to do this would be to write an object that reacts to the data (control source). Unfortunately access does not have such an object as...
Top Bottom