User Profile

Collapse

Profile Sidebar

Collapse
Tim F
Tim F
Last Activity: Apr 17 '14, 03:14 AM
Joined: Aug 11 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Word 2007 VBA - Me.Control has different value to FormName.Control

    Hi all,
    I have been scratching my head over this one for a day now!

    I have a word 2007 document with 2 user forms, Form1 and Form2. Form2 is activated from Form1 and should let the user select a value from a listbox and have that value sent to a textbox Text1 in Form1.

    I am doing this as follows:

    in Form1 module
    Code:
    Public Sub SetCode(ByVal Code as String)
    Me.Field1.Value=Code
    End Sub
    ...
    See more | Go to post

  • Tim F
    replied to Help with structure of database
    Many thanks for the suggestions!
    See more | Go to post

    Leave a comment:


  • Tim F
    started a topic Help with structure of database

    Help with structure of database

    Hi all!

    I've been asked to develop a database at work and I'm a bit stumped about the best way to structure it. I wonder if anyone could offer any thoughts?

    The issue is that data will have multiple nested categories, with different numbers of entries and sub entries for each.

    For example

    Code:
    Item 1
    	Heading 1
    		Category 1
    			Data
    			Data
    			Data
    ...
    See more | Go to post

  • The categories won't be known in advance but I think you're right - I'll have to end up with separate controls that can be populated by a series of loops, so first pull out all categories from the table, then set a bunch of label values to each categories, then for each label populate another control with records matching that label value and then resize each control to fit its contents.
    See more | Go to post

    Leave a comment:


  • Just to clarify are you saying you have a form with combo boxes and when you click a button you want the values from the combo boxes copied into a record in a table?

    To add a date picker create a Date/Time field in a table and then drag the field from the field list to a form. The date picker should display when the field is clicked. If not, select the text box and in properties set 'Show Date picker: For Dates'
    See more | Go to post

    Leave a comment:


  • Tim F
    started a topic How to display a list of clickable grouped records?

    How to display a list of clickable grouped records?

    Hi all, I wonder if anyone could offer me some suggestions on whether the following can be accomplished:

    I would like to display a list of records from a table, grouped by a field in those records. Ideally I'd be able to apply formatting to some elements - eg have the group headings be bold.

    For example I have a Record ID field and a Category field for each record. I would like to generate a list that looks like:
    ...
    See more | Go to post

  • Thank you very much Seth & zmbd - I have followed your advice and learnt a bit in the process. I'm using zmbd's suggestion and following the logic have been able to make a few changes to get it doing exactly what I want.
    Cheers!
    See more | Go to post

    Leave a comment:


  • Cheers for the reply!
    I tried your suggestion but got error 'Cannot have aggregate function in WHERE clause (MAX()=)'
    A little googling suggested I need to use HAVING instead of where so I ended up with:
    Code:
    SELECT 
       tblProjects.Project_Number,
       tblProjects.Project_Name,
       tblProjectStatus.Exec_Status 
    FROM tblProjects
       INNER JOIN tblProjectStatus 
          ON tblProjects.Project_Number
    ...
    See more | Go to post
    Last edited by zmbd; Sep 19 '12, 03:23 AM. Reason: Formated SQL for easier reading.

    Leave a comment:


  • Query to find max date value for an ID in a linked table

    Hi all! I wonder if anyone could offer advice - I am not exactly an SQL gun and have been playing with this for a day now. Any nudges in the right direction would be very much appreciated.

    I am trying to create a query based on 2 linked tables, that gives me a grouped list of IDs from table 1 and a the latest date in table 2 for a row that has the same ID as table 1

    So for example I have 2 tables.

    table1...
    See more | Go to post

  • Can I use DoCmd.OutputTo to export the current record only?

    Hello all,

    I would like to create a command button on a form that will allow the user to export the current record to .xls.

    The following exports the entire table. Is there a way to export the current record being viewed only?

    Code:
    DoCmd.OutputTo acOutputForm, "frmInputView", acFormatXLS, "filename.xls", False
    Many thanks,
    Tim
    See more | Go to post

  • I resolved this by adding an onchange event to DateC that just said me.DateC.setfoc us. That entered the new value and let me use an AfterUpdate event to trigger my actual code, using me.undo to cancel the entry in DateC if it didn't meet my parameters.

    So effectively as soon as a value is entered, the code was triggered to check whetehr that value was correct, before the user could leave the field.
    See more | Go to post

    Leave a comment:


  • How to return the new value entered into a control onchange?

    Hi all,

    I have a problem with a form that I'm developing at work and would love any assistance so I'm not wondering all night!

    I have 3 fields, dateA, dateB and dateC.

    dateA and dateB contain 2 separate dates. dateC is empty by default.

    The user is supposed to enter a date in dateC that falls between the dates in A and B. I have already written the script to compare a given date value with...
    See more | Go to post

  • Advice on achieving a dynamic page of text in access

    Hi all,

    I am hoping someone can give me a starting point for what I want to achieve. I have a working knowledge of access and VB but I am a recent learner so there's probably a lot of things that I don't even know exist.

    I want to create a 'checklist' on a form. The user fills in the checkboxes and then presses a button. Pressing the button launches a popup form with various pieces of text displayed, based on how the...
    See more | Go to post

  • Solved. Many thanks for the assist.

    Code:
    Private Sub Label38_Click()
    frm_filter = "Date_for_resolution < date()"
    DoCmd.OpenForm "frmIssuesTabular", , , frm_filter
    End Sub
    See more | Go to post

    Leave a comment:


  • Thanks for the tips! If I create a query as you suggest, will this affect the form when opened without the new button I am creating? This form has a range of different ways to open with various filters applied, so I want to avoid changing the actual form directly if possible.
    See more | Go to post

    Leave a comment:


  • Trying to filter a form to only values in a date field that are older than today

    Hi all,

    I am using Access 2007 in Win XP.

    I have a field named Date_for_resolu tion in a table. I am trying to make a button that opens a tabular (continuous) form I have created, and filter it to display only records from the table where Date_for_resolu tion is older than the current date.

    I have the following code at the moment but it is giving me Run-time error 3464 - Data type mismatch in criteria expression....
    See more | Go to post
No activity results to display
Show More
Working...