Search results

  1. 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...
  2. 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...
  3. 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] = '" &...
  4. 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...
  5. D

    Increase Search Efficiency

    You betcha. Good luck on your projects! -dK
  6. 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...
  7. 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
  8. 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...
  9. 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...
  10. 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 =...
  11. D

    Filter Records

    In this thread, there is a link that demonstrates how to use a combo box to navigate to a record. -dK
  12. 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...
  13. 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...
  14. 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...
  15. D

    command button

    Sorry duder ... I can't get past the names bit, yet. It normally isn't an issue but it could be creating some havoc because of scope - so trying to eliminate that part first since it is easy. You have ... Private Sub Import_Click() On Error GoTo Err_CmdImportExcel_Click ...
  16. D

    Increase Search Efficiency

    I am not sure if this will help - here is something I wrote and used in many databases that I've thrown together. Although it uses filtering (and not query driven), it might help clue you in where you are or provide an altogether new solution. Even though it doesn't do any true fuzzy...
  17. D

    command button

    I would think that the bits about ... On Error GoTo Err_CmdImportExcel_Click Exit_CmdImportExcel_Click: Exit Sub Err_Command8_Click: Resume Exit_Command8_Click Are at odds with one another. That is, if error go to cmdImport... and it has nowhere to go because the other reference is for...
  18. D

    Increase Search Efficiency

    Use Or instead of And. -dK
  19. D

    Payroll - Complex If Statement for PAYE

    Okay ... here is something ... validate the logic tho ... Dim dEarning As Double Dim dPaye As Double dEarning = Nz(Me.txtEarning, 0) dPaye = 0 'is there anything in earnings? If dEarning > 0 Then 'assign first 30000 @ 5% (if less than compute) If dEarning >= 30000 Then...
  20. D

    Payroll - Complex If Statement for PAYE

    Complex, indeed. :eek: Updated: Removed entry because I realized the fallacy in my thought process until I saw it typed. Will work on this a bit more before posting final proposal ... Apologies, -dK
Back
Top Bottom