Search results

  1. D

    How to validate against another table?

    Almost there .... you are missing some quotes where you are trying to refer to the form ... ","[Item Type]= " & ([Forms]![frmAssests]![Item_Type]) & " AND These will break up the string to pull in the value you are referring to. You will need to do the same wherever you try this at. Also...
  2. D

    What variable type to use with memo field in VBA

    There shouldn't be a limit (except for memory). Now, I've always understood that different interfaces might put a restriction on a string's length (i.e., MsgBox and some Import methods). For memo fields, I've always loaded those into strings without issues. -dK
  3. D

    What makes the best president?

    Unfortunately, the office of the Presidency (US) has changed over time. The President shouldn't have 'programs' or 'agendas' when they assume office. This wasn't the original intent of the President. States interest are served by the other delegates in Washington (Senators, Representatives)...
  4. D

    Simple two table join select query but..

    Not sure what you mean. If you could provide the scenario, a set-up example and the objective it might be helpful for a good response. -dK
  5. D

    Syntax Error

    Ah ... aye, see what you mean. I've abused and have had a lot of success with Allen Browne's method? Here is a link to it (I couldn't find it on his site). Most of it could probably be deleted but calling your attention to the last 30 lines. If you could understand this, then it would be...
  6. D

    How to validate against another table?

    Gotcha. I would assume that you would validate against a unique field such as a serial number? This link can provide some insight. Also, I forgot to add a Cancel = True in each If event for the form validation. This will cancel the save action on the event. On the evaluation of the...
  7. D

    Syntax Error

    I see where you were going and it could be a difficult road. For instance, writing some extra code to clip off the bits at the end you already have added. Now, depending on how your report is built you could modify it for both conditions .... If Not IsNull(Me.RegionCmbo) Then sWhere...
  8. D

    How to validate against another table?

    Ah I see. In the BeforeUpdate event of the form, you could use ... If Len(Nz(Me.cboComboManu, "")) = 0 Then MsgBox "You must enter the manufacturer.", , "Manufacturer" Me.cboComboManu.SetFocus ElseIf Len(Nz(Me.cboComboMake, "")) = 0 Then MsgBox "You must enter the...
  9. D

    Syntax Error

    You have two conditions that are independant of each other. If one is null and the other is not - there is the bit about the AND and the ( hanging out there doing nothing. Perhaps something like ... Dim sWhere As String If Not IsNull(Me.RegionCmbo) Then sWhere = "[Region] = '" &...
  10. D

    How to validate against another table?

    Greetings and welcome to the forums! You could use a recordset and loop through performing comparisons. However, why not make those items a combo-box on the form? In this manner, the user selects certain items (manu, model) from the combo box thus negating the need to validate after input...
  11. D

    Increase Search Efficiency

    You betcha. Good luck on your projects! -dK
  12. D

    Eliminate duplicate data by Dcount

    Haha! You are correct. :o Is what I get for trolling the boards that late. I was thinking of the way that I check for duplicates ... DLookup. As an ego recovery mechanism, I shall explain. :cool: I perform a DLookup to fetch and store the primary key of the record into the variable. Then I...
  13. D

    Drop Down Menu Auto Load on form?

    As far as I know, that is the way they work. I've gotten around it by concantenating two columns ([LastName] & ", " & [FirstName]). Of course, this is in the macros section and I don't know anything about those. HTH, -dK
  14. D

    Help with SubForms & Tables

    Not sure of your version or what exactly is it is you are trying to accomplish, so sending you here: http://www.functionx.com/ If you look down the left-hand side there is some information for MS Access 2003 and 2007. I would suggest starting with 2003 and looking at the subforms for what I...
  15. D

    Closing/Delete Record on Form

    Not really - it sounds as if you have multiple problems occuring simultaneously. Perhaps something you are doing when the form loads/unloads, opens/closes, etc., is causing all of the misdirection. Strip the form down to its basic function with only the close button and see if it operates...
  16. D

    Eliminate duplicate data by Dcount

    Along with Paul's advice, you might be throwing an error because if DCount does not find anything, it returns a null. So either use the IsNull, Not IsNull or Nz to analyze the logic correctly. I've simply used the Nz and evaluated in the same manner as you. For example, .... tot =...
  17. D

    Filter Records

    In this thread, there is a link that demonstrates how to use a combo box to navigate to a record. -dK
  18. D

    Increase Search Efficiency

    Try ... SELECT tblData.[No], tblData.Client, tblData.ClientNo, tblData.Address, tblData.Date FROM tblData WHERE (((tblData.Client) Like "*" & [Forms]![frmSearch]![txtSearchString] & "*") AND ((tblData.Requested) Like "*" & [Forms]![frmSearch]![cboYear] & "*")) I made the bit in red...
  19. D

    Question Using Relationship

    Yes, that would be the autonumber field. This table would fall in between the other two from a relationship perspective. In this manner to find out all of the classes a student was in, you would map that through the junction. Or, what students were in each class, you would map through the...
  20. D

    Question Using Relationship

    A junction table will work. Suppose you called this table tPayment. The core fields for the table might look something like ... pkPaymentID (primary key) fkStudentID (foreign key) fkClassID (foreign key) ClassAmount AmountPaid ..... Here, you would tie the specific class with the students...
Back
Top Bottom