User Profile

Collapse

Profile Sidebar

Collapse
OzNet
OzNet
Last Activity: Jan 29 '14, 08:23 AM
Joined: Aug 3 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • OzNet
    replied to Show / Hide Form depending on data
    Thanks RuralGuy

    That did the trick!
    See more | Go to post

    Leave a comment:


  • OzNet
    started a topic Show / Hide Form depending on data

    Show / Hide Form depending on data

    Hi

    I have a main form and want to put two subforms on a tabbed control (on the same tab)

    Subform 1 will display data if it corresponds with the data on the main form. When this is true, subform 2 will be blank

    Likewise, subform 2 will display data if it corresponds with the data on the main form and when this is true, subform1 will be blank.

    How can I make the subforms visible only when...
    See more | Go to post

  • OK - I worked out what was wrong.

    I created another combobox which worked and then compared the different properties.

    The problem was a piece of code which I had attached to the OnClick property:
    Code:
    Me.Requery
    and must have interfered with the action of the OnChange piece of code.

    I would have added this code to refresh the data and then later added the OnChange code.
    See more | Go to post

    Leave a comment:


  • Thanks for your replies, I'll try and give you the essential information.

    The combobox is bound (control source) to the ProjectServiceL S field of the tblProjectEsitm ates table via a query. This table and query also has a field called SortOrder which I want automatically filled when making a selection in the combobox.

    The combobox looks up a table called tblProjectServi ces to get the PCode (Project Code) field value....
    See more | Go to post

    Leave a comment:


  • OzNet
    started a topic Me.cboProjService.Column(3) Not working correctly

    Me.cboProjService.Column(3) Not working correctly

    I have a combobox on a subform with this code attached.

    Code:
    Private Sub cboProjService_Change()
    If Not IsNull(Me.cboProjService) Then
        Me.SortOrder.Value = Me.cboProjService.Column(3)
        Me.Refresh
        Me.Requery
    End If
    End Sub
    The subform is a continuous form. The Combobox updates the SortOrder field of the first record but subsequent records do not update when changed.
    ...
    See more | Go to post

  • OzNet
    replied to Linking Excel to Access Query
    Mshmyob, your example is working and gives me something to build on. I really appreciate your help.

    Many thanks
    See more | Go to post

    Leave a comment:


  • OzNet
    replied to Linking Excel to Access Query
    Stewart, I have already tried that after posting the original piece of code. It did not help....
    See more | Go to post

    Leave a comment:


  • OzNet
    replied to Linking Excel to Access Query
    Thanks again for your suggestions

    This is what I have tried:

    In a module
    Code:
    Function TDXLOut(sql As String)
    CurrentDb.QueryDefs("MyQuery").sql = sql
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "MyQuery", "C:\ExcelTest\book1.xlsx", True
    End Function
    Attached to a button
    Code:
    Private Sub Command4_Click()
    Dim strSQL As String
    ...
    See more | Go to post

    Leave a comment:


  • OzNet
    replied to Linking Excel to Access Query
    Thanks Stewart

    I am using Access 2007 if that make a difference to issues you mention above.
    The references listed above are ticked plus I realise now I also have the Microsoft Excel 12 Object library ticked as the code above apparently needs this to work. (I have 6 references ticked).

    I assume the list is the same regardless of which sub/module etc I have open for editing.

    In other subs I have...
    See more | Go to post

    Leave a comment:


  • OzNet
    replied to Linking Excel to Access Query
    Thanks Stewart

    I tried that but still get the error. I also tried to tick the Microsoft DAO 3.6 Object Library reference as you suggested but I get a message saying it conflicts with existing Module, project or object Library.

    Under references I have the following ticked:
    Visual Basic for applications
    Microsoft Acces 12 Object Library
    OLE automation
    Microsoft Office 12 Access database engine...
    See more | Go to post

    Leave a comment:


  • OzNet
    replied to Linking Excel to Access Query
    OK

    I have found some code that may do the job but I am getting a Runtime Error 3061 Too few parameters Expected 1 message.

    This is the code:

    Code:
    Private Sub Command3_Click()
    'This code was originally written by Dev Ashish
    'It is not to be altered or distributed,
    'except as part of an application.
    'You are free to use it in any application,
    'provided the copyright notice is
    ...
    See more | Go to post

    Leave a comment:


  • OzNet
    started a topic Linking Excel to Access Query

    Linking Excel to Access Query

    I have a query (with calculated fields) in Access (2007) and the data changes depending on the dates and staff person selected. I need to produce a series of graphs based on the data in this query and it seems to me that Excel is far easier to create graphs than Access.

    When I use the Get External Data feature of Excel and the dialog box with the tables and queries appears, the query I need is not listed. Is this because the query...
    See more | Go to post

  • OzNet
    replied to Date Function anomaly
    Thank you Linq ;0)> and NeoPa for your responses. I appreciate it.

    Cheers
    See more | Go to post

    Leave a comment:


  • OzNet
    started a topic Date Function anomaly

    Date Function anomaly

    I have some functions to calculate the working days in a given period. This includes a table that is queried to calculate the number of public holidays that don’t occur on a weekend.

    If I test the function using the intermediate window, it works fine. However, when I pass the dates from the code attached to my form, the results are inaccurate.

    You will notice my dates are in Australian format. Everything works...
    See more | Go to post
    Last edited by NeoPa; Jan 23 '09, 02:41 PM. Reason: Please use the [CODE] tags provided

  • OzNet
    replied to File not found error
    Thanks Delerna

    This is what I have done.

    I made a copy of the db and progressively deleted forms and queries until I only had all the table and one form and query left. It was still producing the error.

    I had thought of trying your suggestion of creating a new db and importing the components into it but I found a backup copy that was behaving itself, so this won't be necessary.

    As I think about...
    See more | Go to post

    Leave a comment:


  • OzNet
    started a topic File not found error

    File not found error

    The database I have been working on has now starting producing this error.

    Each time I try to edit a vba code it produces this error. I can't even put in the comment symbol in to comment out lines of code.

    What is even more puzzling is that it occurs regardless of any form I open the try to edit code.

    I have been playing around with queries trying to achieve a certain result but this would have no bearing...
    See more | Go to post

  • Thanks Linq ;0)>

    That did the trick!

    Actually, I thought I had tried that at some stage but it did not work before. Obviously, I mistyped something!
    See more | Go to post

    Leave a comment:


  • OzNet
    started a topic Syntax error (Missing Operator) in query expression

    Syntax error (Missing Operator) in query expression

    I am getting this error:
    Syntax error (Missing Operator) in query expression '[Project] =ZYZ Project'

    My code is:
    intProjectEstim ate = DSum("LumpSum", "tblProjEstimat eLumpSum", "[Project] =" & Me.cboProject & "")

    I have tried various combinations of double and single quotes without success.

    Can anyone shed some light please?

    Many...
    See more | Go to post

  • OzNet
    replied to How to Increase a variable by one
    I feel so stupid - I had mixed up my field and variable names.
    It should have been
    MsgBox intInvNo (number is say 500)

    intInvNo = intInvNo + 1

    MsbBox intInvNo (number is 501)

    InvNum is the field name!
    See more | Go to post

    Leave a comment:


  • OzNet
    started a topic How to Increase a variable by one

    How to Increase a variable by one

    I have an integer variable called intInvNum.

    I want to increase the number by one.

    This is my code that is not working with the brackets showing testing results.

    MsgBox intInvNum (number is say 500)

    intInvNum = intInvNum + 1

    MsbBox intInvNum (number is 1)

    I am sure this is simple but I can't get it to work for some reason

    Many thanks
    See more | Go to post
No activity results to display
Show More
Working...