User Profile

Collapse

Profile Sidebar

Collapse
LeighW
LeighW
Last Activity: Apr 11 '13, 02:40 PM
Joined: May 24 '12
Location: London, UK
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thanks a lot guys,

    I've annoyingly got Access 2003 so I haven't got the "On Load" event in the report.

    I've tried both NeoPa's and Smiley's methods and for some reason Smiley's method refuses to fire while Neopa's does.

    Now I have to work on changing the format to a more human view somehow so it doesn't show up like:
    Code:
    (([Permit = RSR) AND [Approval] = True)
    But more like...
    See more | Go to post

    Leave a comment:


  • Is there a way of showing the filter criteria in the cover page of a report?

    Hi all,

    I'd like a cover page that shows which filter criteria have been used when creating the report. If this can't be done/ is very hard to implement then I'll leave it be but I thought it would be a nice touch.

    So lets say I have in my table (tbl_1) with fields,

    ID
    Title
    Description
    Permit
    Approval
    Date

    The report (rpt_1) is linked to tbl_1 and has...
    See more | Go to post

  • Of course! I don't know why I didn't think of that. My minds been too wrapped in VBA lately. That way it will be easy to introduce new names without getting into VBA.

    Thanks for the help Rabbit
    See more | Go to post

    Leave a comment:


  • Changing tracked user names to something more comprehensible

    Hi all,

    I'm tracking any changes made to records within the database which includes user name and storing it within an archive table (tbl_Archive)

    To track the user name I'm using code I managed to find on this site within a form's module which works a treat and is shown below:

    Code:
    Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
    "GetUserNameA" (ByVal lpBuffer As
    ...
    See more | Go to post

  • Hi MTB,

    Thanks very much for the reply.

    Yeah sorry I forgot to add the info on the tables but what you have said is correct and PK_ID is numeric yes.

    I've tried the DCount method and it works great. Forgot about using a DCount to be honest!

    Very grateful for the help,
    Thank You!
    See more | Go to post

    Leave a comment:


  • Error message when linking to a form with no records

    Hi all,

    I have a form, Form 1 with primary key PK_ID
    I have a second form, Form 2 with foreign key FK_ID

    I link through to Form 2 using the field PK_ID.

    It is also possible to open Form 2 from Form 1 filtered by PK_ID again in add mode which allows the user to add a new record in Form 2 that automatically links to the record from Form 1.

    What I'd like is an error message which traps...
    See more | Go to post

  • The tables are related in this kind of format.

    Table 1 -> Table 2 -> Table 3

    The problem is someone could modify a record from Table 1 and then a couple completely unrelated records in Table 3 so I guess the report would look a bit messy with a record from Table 1 then Table 3 then Table 2, etc.

    I think to make it as easy as possible for the approver it would be better if it shows all of the unapproved...
    See more | Go to post

    Leave a comment:


  • A report based on one particular field from multiple tables

    Hi there,

    Everytime a user edits data within the bound forms in the database the approval checkbox (which is a bound field) changes to "False".

    Is there a way of creating one sole report based on the records from each table where the approval field is "False"?

    This means that I don't require a relationship between the tables it is purely for an approver to come along generate a report...
    See more | Go to post

  • I've managed to do it.

    Thanks so much for the help guys it's very much appreciated!

    To get it to work I used the Debug.Print bar on a search that worked to see how the syntax was laid out. I realised that these were using [fields] on the other form rather than the check boxes such as "chk_Permit 1". So I changed each of the checkbox names to the names of the fields on the other form i.e. "Permit1"...
    See more | Go to post

    Leave a comment:


  • No worries Z, thank you very much for the help anyway.

    I did what you asked but now when I click the button it prompts you to enter a parameter value.
    See more | Go to post

    Leave a comment:


  • Just to clarify after selecting Permit1 and receiving the error message, if I hover over the string in the code log, z_str_where, it shows the code:

    Code:
    z_str_where = "WHERE ((chk_Permit1 = -1))"
    See more | Go to post

    Leave a comment:


  • To be honest what I'd prefer is to have EITHER just the one box checked and a messagebox popping up saying something along the lines of "you can only search using one permit" if more than one is checked OR all of the permit related records are filtered if more than one permit is checked that being just Permit1 records, just Permit2 records and records with both Permit1 and Permit2 related (If Permit1 and Permit2 have been checked of course)....
    See more | Go to post

    Leave a comment:


  • I'm still not sure how to link the filter now performed on frm_Search with the permit fields on frm_Form1 however. It's obviously not as simple as just adding Line 13 from Post#2 (I'm guessing) as it's still a group of fields i'm trying to filter and not just one.
    See more | Go to post

    Leave a comment:


  • OK scratch that Z it is now working saying chk_PermitX = -1 within the immediate box when the command button is clicked.

    I forgot I had bound controls left on the form from messing about the other day trying to get it to work
    See more | Go to post

    Leave a comment:


  • Hi guys,

    Sorry for the late reply.

    Z - I can see what you mean now with that code. However Me.Controls doesn't seem to work or at least this line is highlighted:
    Code:
    If Nz(z_ctl, False) Then
    It spurs from a run-time error with code -2147352567 (80020009) 'The expression you entered has a field, control, or property name that ms access can't find.'

    This error occurs whether a box is checked or...
    See more | Go to post

    Leave a comment:


  • Sorry Z for not understanding you correctly but do you mean to add that code with the code mentioned before. As with just that code the button does nothing though I can see what it would do if it knew what controls (checkboxes) to use and how they relate to fields on the form to be opened.

    The permits should be the same and if not I have an "Other" field which the user can click and enter text into an unbound textbox to what...
    See more | Go to post

    Leave a comment:


  • frm_Form1 is bound to tbl_Table1

    Fields within tbl_Table1 include PK_ID (Autonumber), Title(Text), Description(Mem o), fld_Pemrit1(Yes/No), fld_Permit2(Yes/No), fld_Permit3(Yes/No), fld_Permit4(Yes/No), fld_Permit5(Yes/No), fld_Permit6(Yes/No), etc...

    On Form1 the fld_Permit# are displayed as checkboxes (true or false) with labels which a user can see and edit if needs be.
    See more | Go to post

    Leave a comment:


  • OK I've set the defaults to "False" on Form1 too and now it is coming up with a different error message: Run-Time Error 3085. Undefined function 'WHERE' in expression
    See more | Go to post

    Leave a comment:


  • The user should only selects one value when using that search method although I guess if the user really wants to filter it by more than one permit they have the option to with "AND"
    See more | Go to post

    Leave a comment:


  • Nay set all the default values to =False but still but working
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...