Search results

  1. R

    Filtering Recordset

    Id like to filter thisr ecordset with a value from a form...however...the filter does not seem to do anythong...please advise. Function getCalendarData() As Boolean Dim rs As DAO.Recordset Set rs = CurrentDb.OpenRecordset("qry_employeeAttendance", dbOpenDynaset)...
  2. R

    Insert Into Help

    I have the below sql statement which works fine...Id like to expand it so i can copy multiple values from the form into the same table. EG: id like to copy values from sig2, sig3 sig4 etc..text92 would remain unchanged. Private Sub CmdSave_Click() If Me.CmdSave.Visible = "True" Then sql =...
  3. R

    The Key is already associated with an element in this collection

    Any help is greatly appreciated: Im using code i found on the web to integrate in my application. I keep getting this error: The Key is already associated with an element in this collection associated with this line: colCalendarDates1.Add strCode1, strDate1 Full Code below: Option Compare...
  4. R

    Zero default value after Dlookup

    Any help is appreciated: Id like to modify this code so if the dlookup returns no value, then i want to default the value in I1=0. If Me.Sig1 = "" Then Me.I1 = "" Else Me.I1 = DLookup("Occurance", "[Qry_Availability1]", "Date_Selected = Sig1 And [title] = '" & Text89 & "'") End If
  5. R

    Tempvars_Sql Help

    I got this code online and im trying to modify it to suite my needs. i would like to execute a filter where: Title_Number in QRY_Calender_Large = [Tempvars]![TempTitleNo] Any help is appreciated Public Sub DisplayMeetings() ' Add any meetings that occur this month to the proper day box...
  6. R

    Dlookup Type Mismatch Error

    I keep getting type mismatch error with this code. The first part of the dlookup works ok...the second part after "and" seem to generate the error. Me.I1 = DLookup("Occurance", "[Qry_Availability1]", "Date_Selected = Sig1" And "[title] = '" & Text89 & "'") Title is in short text format in...
  7. R

    Filter Recordset

    Someone please assist..Cant get this to work right....I keep getting the first value in the query and not the filtered value. Dim rs As Recordset Set rs = CurrentDb.OpenRecordset("Qry_Availability", dbOpenSnapshot, dbReadOnly) rs.Filter = "[date_selected] = '" & Me.Sig1 & "'"...
  8. R

    VBA Coding Error If/Else/ElseIF?

    Im having some issues with this code below...I suspect the issue may be with me else / else if / if commands....any help would be appreciated: Each group of commands individual works as required....However, once the First and Second commands are clear...the third insert to doesn't execute...
  9. R

    Not Like Error

    Need some help with this command...Access VBA gives me an error on this: Compile Error...Expected Expression over the (Like) part of the command elseif me.adjustmentfield Is Null OR Not Like "*[!0-9]*" then MsgBox Prompt:="Only Whole Numbers Can be Entered...Try Again!", Buttons:=vbOKOnly...
  10. R

    Query and Dates

    Im using this code below in query builder....Works fine....But i want it to return all results if i do not select and to and from dates. Please assist. between Forms![StudentForm]![txtBeginDate] and Forms![StudentForm]![txtEndDate]
  11. R

    Login VBA

    I have this Code on a Login screen to an access database.....The Login works as expected...My only issue is i have to click on the OK button twice for the login process vs a one click.....Cant figure out whats going on...any assistance will be greatly appreciated...
  12. R

    SQL Query Problem

    Can anyone Help.... I have this code running which works fine....except that it returns values like 33, 34, 63. I would like it to find an exact match IE: "3" SELECT [New Discplinary Cases].[DAN No], [New Discplinary Cases].LNAME, [New Discplinary Cases].FNAME, [New Discplinary...
  13. R

    Query from Form

    SO i'm using a form to filter data via a query: I have this code in there and it works perfect: SELECT tblEmployeeMaster.[Charge RC], tblEmployeeMaster.[First Name], tblEmployeeMaster.[Last Name], tblEmployeeMaster.HDQMGT0084, tblEmployeeMaster.HDQMGT0085 FROM tblEmployeeMaster WHERE...
  14. R

    Dlookup with Multiple Criteria

    HI All, Need some assistance with a dlookup code…..I previously had this function which worked out to my needs..... Combo27 = DLookup("Desc", "[HPEMProblemCodes]", "TaskCode= '" & [Problemcode] & "'") Now I am trying to add a second criteria to the dlookup where temp1 in my form must also...
  15. R

    Dlookup in Forms

    Can anyone please assist: I have this dlookup code setup..but for some reason i only get the first record....I tried several things but cant seem to get over that hump... Anyone please assist. --All fields are setup as short text in the table. However Task_Code is a numeric value Option...
Top Bottom