Search results

  1. B

    Duplicating Dates on an Individual form

    Can you provide any screenshots along with explanations? Relationships? You can of course copy over data from one form to another but without knowing more of your design and needs it is hard to advise. You could use a combobox as a selection for the destination and then run code to append the...
  2. B

    How to copy unbound txt box on form to a currrent record in table

    I'm not going to debate the username thing. I disagree. Still, here is an example you can modify to suit your needs. Dim strSQL As String 'Log Changed Password to tblLostPassword. strSQL = "INSERT INTO tblLostPassword (lastsignon,userID,pw ) " strSQL = strSQL & "VALUES (#" &...
  3. B

    Add a sequential alphanumeric record to a table

    You can create a mask for your criteria. Example: [InvNo] & "-" & [PrimaryKey] & "000" HTH
  4. B

    How to copy unbound txt box on form to a currrent record in table

    Doing that way is not advisable since Username is not reliable. Their are Demo's available in the Samples section. That said, it would be much better to use a DLookup for the user and password and compare against your table.
  5. B

    Payroll Strategy

    Read Question Again! It is already written, was asking for some thoughts, direction.
  6. B

    Work with Keys in vba

    Your request was kind of vague, could you be more specific? Here is a Macro Example: HTH
  7. B

    Payroll Strategy

    If you were designing a Payroll database and wanted to add absence and vacation time into it, Would you: A. Add the Required fields to the Payroll and simply link to the others tables B. Create subforms linked by PK and FK C. How would you then track the absence and vacation time apart from...
  8. B

    Trap Error

    Follow up question. Since I have a Composite Index to prevent duplicates I get the error message. How can I trap this? I resolved it with this code. Thanks, 'Trap Error. Dim DataErr As Integer Dim Response As Integer Dim Message As String If DataErr = 3022 Then 'Duplicate value entered...
  9. B

    Add Extra Field to SQL Syntax

    Yes, Thanks Again. I'm learning. I appreciate the help. Just what I needed.
  10. B

    Add Extra Field to SQL Syntax

    Here is a Screenshot. HolDte should equal HolidayDate
  11. B

    Add Extra Field to SQL Syntax

    To Make HolDte (a Date) match HolidayDate since that is a field in which I have a Composite Key.
  12. B

    Add Extra Field to SQL Syntax

    I need to add HolDte and make it also use HolidayDate as it's criteria. strSQL = "INSERT INTO tblHour (WorkDate,Hours,HolDay,EmployeeID) " _ & " VALUES (#" & Me.HolidayDate & "#," & Me.txtHrs & ",True," & Me.EmployeeID & ")"
  13. B

    Prevent Duplicate Date in Table

    Thanks for the suggestion. It does not seem to be working for me with my current design. 1. If some criteria then open form, do not open form. 2. Form opens and code runs to append data into table. A. I would ideally opt to not have the form open via code if criteria is not met.
  14. B

    Prevent Duplicate Date in Table

    I don't want to allow more than one instance of (HolDte) for the same EmployeeID If DLookup("[HolDte]", "tblHour", "[EmployeeID]='" & Me.EmployeeID.Value & "'") <> Me.HolDte.Value Then Exit Sub End If
  15. B

    SQL Syntax Error

    Thank You. That Worked is exactly what I needed. Thanks Everyone for sticking with me.
  16. B

    SQL Syntax Error

    No Problem, Still struggling with it. Latest Attempt. OnLoadEvent of form. No errors when form opens? Debug shows code in red, syntax error is all. Dim strSQL As String Dim HolidayDate As Date Dim AbsenceHrsID As Long Dim EmployeeID As Long Dim HolDay As Parameter strSQL =...
  17. B

    SQL Syntax Error

    Maybe that's the problem. The solution escapes me for now. I have tried this with a popup form and also a subform with no luck. Of course it has to a matching value for the Employee. EmployeeID to EmployeeID in popup form Or EmployeeID to AbsenceTypeID in subform. I will continue to test and...
  18. B

    SQL Syntax Error

    Hmm, so far no issues with that field name! Still, I get this error. Error 3075 syntax error in (missing operator) query expression '4 WHERE tblHour.EmployeeID=2'.)
  19. B

    SQL Syntax Error

    Had to revise code, it was not what I wanted. Error is: Error 3075 syntax error in query expression '#5/13/20154 WHERE tblHour.EmployeeID=2'.) Dim strSQL As String strSQL = "INSERT INTO tblHour (WorkDate,Hours) " strSQL = strSQL & "VALUES (#" & Me.HolidayDate &...
  20. B

    SQL Syntax Error

    Yes, it is a number.Revised Code,Error is missing operator in AbsenceHrsID SSql = "UPDATE tblHour" _ & " SET tblHour.WorkDate = & Me.AbsenceHrsID " _ & " WHERE tblHour.EmployeeID= " & Me.EmployeeID
Back
Top Bottom