User Profile

Collapse

Profile Sidebar

Collapse
mbizup
mbizup
Last Activity: May 4 '17, 12:40 AM
Joined: Jun 28 '15
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Or if the user's role/form purpose is exclusively to enter new data, you can simply set the form's Data Entry property to YES.
    See more | Go to post

    Leave a comment:


  • Similar to your other question... use a query to define the criteria you want for the records in your report. The query can then be used as the recordsource for your report.

    eg:
    Code:
    SELECT * FROM YourTable WHERE YourDateField = #4/27/2016#
    See more | Go to post

    Leave a comment:


  • Assuming you have an Autocount ID/Primary Key field or some other way of indicating the order in which the records were entered, you can use a TOP 1 query, with a descending sort order to return the last record as the RecordSource of your report:

    Code:
    SELECT TOP 1 * FROM YOUR TABLE ORDER BY ID DESC
    See more | Go to post

    Leave a comment:


  • mbizup
    replied to Dlookup works on all forms, except one.
    With the = sign in front of your DLookup, it looks like you are trying to apply this to a control source property vs VBA code.

    If this is indeed used in a control source property, on a property sheet, the "Me" prefix will fall over (to my knowledge that is only valid in VBA).

    You can use the full form reference:

    Code:
    =DLookUp("LastName","ClientT","AvatarNumber=" & Form
    ...
    See more | Go to post

    Leave a comment:


  • mbizup
    replied to Report Filtering Issue
    The above comment is correct... you need to delimit any text data with quotes.

    Additionally, your VBA is gong to result in SQL criteria including conditions along the lines of:

    Code:
    SemesterYear = (Thie OR That OR SomethingElse)

    This syntax will fail in SQL. You have two options for a list of ORs:

    1. Spell it out as separate comparisons like this. Also note the parentheses to separate a list...
    See more | Go to post

    Leave a comment:


  • What you're describing (lowest two PER ID) is a Top N Per Group query. Subqueries are one way to accomplish this. Take a look at Allen Browne's post here, under the heading "Top N Records Per Group":
    Subquery Basics

    You'll need the DESC Keyword to get the lowest.

    {Edit}Relevant excerpt from Allen's article.
    TOP n records per group

    You want the three most recent orders for each...
    See more | Go to post
    Last edited by NeoPa; Apr 3 '16, 04:15 AM.

    Leave a comment:


  • mbizup
    replied to Combo Boxes on subform not syncronising
    The quotation mark delimeter for text suggestion is excellent and accurate. However, I believe the immediate cause of the 'invalid bracketing' error is your use of the VALUE property.

    The Value property is part of VBA, not SQL syntax. If you are trying to refer to a field named Area in a query or table named ContractorDetai l, the syntax should be (note that I've dropped the Value property)

    Code:
    WHERE [ContractorDetail].[
    ...
    See more | Go to post

    Leave a comment:


  • Just clarifying...

    Are you saying that your grouping/sorting works as expected in Print Preview, but NOT if the report is opened in Report View?

    Is your code similar to what Allen Browne has posted here?
    Sorting Reports at Runtime

    If not, please post your code.
    See more | Go to post

    Leave a comment:


  • mbizup
    replied to Multiple Forms or Hide Controls?
    Seconding NeoPa's suggestion for subforms. A common layout when dealing with multiple subforms is to use a tab control on the main form, and place each subform on a separate page of the tab control. With this approach, only the subform on the currently selected tab/page displays at any given time.
    See more | Go to post

    Leave a comment:


  • mbizup
    replied to better display of results
    By the way nice job working out the code... feels good, doesn't it?
    See more | Go to post

    Leave a comment:


  • mbizup
    replied to better display of results
    <<< is it possible to Change the FONT Color of the cell in an IF Statement??
    like IF the cell has this value Change Color to green..>>>

    Did you work out how to use "Expression IS" formatting in the conditional formatting popup.

    <<
    i did conditional formatting to the subform..
    but this formatting dissapears when i open the popup form..
    >>

    Have...
    See more | Go to post

    Leave a comment:


  • mbizup
    replied to better display of results
    I might have gone cross-eyed switching the MLE/Import loops around in that second block, so you may need to fix it up... Just a tip - when naming recordsets, especially when your code involves multiple recordsets, using names relevant to the actual data (eg: rsMLE and rsImport as opposed to rs and rs1) makes your code easier to follow.
    See more | Go to post

    Leave a comment:


  • mbizup
    replied to better display of results
    Ah okay...

    That would be pretty much the same code with the loops reversed, executed AFTER the first block...

    Code:
    for each fld1 in rs1.fields   ' Loop through import table fields
          for each fld in rs.fields  ' Loop through MLE fields
              if fld1.name = fld.name then
                     fnd = true ' We have a match! Exit, and continue to next IMPORT field
                     varFld = fld.Name  ' Save
    ...
    See more | Go to post

    Leave a comment:


  • mbizup
    replied to better display of results
    What I posted was intended as a completely new/independent procedure...
    See more | Go to post

    Leave a comment:


  • mbizup
    replied to better display of results
    >>> also having all the MLE table field names would be better rather than only the matcheed ones.

    You could add a second nested loop with the MLE recordset on the OUTSIDE, and an insert query to record ONLY unmatched MLE fields (ie: no records added in this second loop when matches are found).
    See more | Go to post

    Leave a comment:


  • mbizup
    replied to better display of results
    Perhaps something like this is more what you're trying to do?
    Code:
    ' add these declarations
    dim fld as dao.field  
    dim fld1 as dao.field
    dim varFld as Variant
    
    varFld = Null
    
    Set rs =  (your MLE recordset)
    Set rs1 = (Your Import Table recordset)
    
    for each fld1 in rs1.fields   ' Loop through import table fields
         for each fld in rs.fields  ' Loop through MLE fields
    ...
    See more | Go to post

    Leave a comment:


  • mbizup
    replied to better display of results
    Just verifying again - the IMPORT table is the one with extra (unmatched) fields, correct?
    See more | Go to post

    Leave a comment:


  • mbizup
    replied to better display of results
    If you switched the order of the loops, you'd also have to adjust the str and stp definitions accordingly...
    See more | Go to post

    Leave a comment:


  • mbizup
    replied to better display of results
    Since you're no longer using the message box, you don't need the " mysas = mysas & str & vbCrLf", right?

    Also, so that the insert query with just the ImportColumnNam e only gets run in the 'no match' condition, it needs to be enclosed in a BLOCK If statement...

    Code:
    If Not fnd Then    
         samsql = "INSERT INTO TEMP_Table (ImportColumnName) Values('" & stp & "')"
    ...
    See more | Go to post

    Leave a comment:


  • You've posted this question on at least one other forum... You might find that you get more targeted responses by posting in one place, and responding promplty to the people trying to help (ie: collaborate!).
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...