Search results

  1. G

    calculate time in hours minutes and seconds between two dates

    I once made a similar function too : http://www.access-programmers.co.uk/forums/showpost.php?p=1464028&postcount=41 You just need to remove the holiday part and it is fully functionnal with any output you want.
  2. G

    Running queries on specific dates

    Or you can make an enum for field Letter_Dept and Canvas_Block. That way you can expand the enum in the futur if needed.
  3. G

    Access SQL grouped count

    Can you post extra information about your database ? I guess Ranman256 didn't see that the values of a job is done by a count. That value can't be stored in a field in that table. That is why I proposed 2 solutions. Since you don't know vba, you can create a new table where you store the values...
  4. G

    Access SQL grouped count

    So just to get the correct picture : You select and count all the different jobs. Then you have 1 control for each job in a form where a user can enter a number ? If that is the case, put the result of the select in an array and change the correct index with the number in the control. You will...
  5. G

    Hoover Over Textbox Display Text In Textbox

    I solved this problem once by not using the database list view. I just created a normal form with all the lines on it. Then i could set the Controltiptext of the text box to the same value as the textbox. Then hover over it will show all the text. (Warning : max length of the ControlTipText is...
  6. G

    Changing value of fields a set of records based on a field value change

    I think that since the order of the records is determined by a date, you don't need to store that number in the database. Just calculate it when you do a select on the data. example : select Date, ROW_NUMBER() OVER (ORDER By Date DESC) LessonNumber, LessonStatus
  7. G

    Need Help For query

    Not sure a big deal but you miss a closing ')' in the WHERE : WHERE (((PTblPOs.POSelfDelivery)=False) AND ((PTblInv2GR.I2G_InvIDRef) Is Null);
  8. G

    Open folder from a form and import Excel file

    Note that the code from Ranman256 is to save a file. You need to change the filedialog into msoFileDialogFilePicker. Here is an example : https://msdn.microsoft.com/en-us/library/office/ff196794.aspx
  9. G

    VBA trouble opening form for newly added record

    I suppose [NodeID] is the Id of the node you just tried to save ? Not sure if get the correct value there if you force the dirty to update. Have you tried to refresh the data just before opening the form ?
  10. G

    Allowing selection of null from combobox

    Maybe you can use the event NotInList ? https://msdn.microsoft.com/en-us/library/office/ff845736.aspx Something like this :http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=64608&stc=1&d=1480606660 If you open the form and enter a random text you will get a nice message...
  11. G

    Allowing selection of null from combobox

    So if the user select a value that is in the combobox, sometimes he will get the message : "The text you entered isn't an item in the list." So if I am correct you ask the user to select a text from a pre-defined list. If the user selects one you tell him that it isn't an item of the list ...
  12. G

    Command Button is not functioning

    I use single quotes for strings. I work all day with Microsoft SQL manager... If you try to use double quotes, the sql gives a nice error. But in Access you can use both. But the problem of the OP's query was that he missed the first quote in this part : where LoginID = " & Me.cboUser & "'"
  13. G

    Command Button is not functioning

    You know that SQL doesn't use double quotes ? You need to use single quotes when updating strings. So you need : strSql = "update tblUser set txtPassword = '" & Me.TxtNew & "', dteChanged = #" & Date & "# where LoginID = '" & Me.cboUser & "'" Same in the DLookup. You are missing the first ' in...
  14. G

    Command Button is not functioning

    Maybe it is a good habit to name the controls with a meaningfully name. Private Sub Command14_Click() Dim strOldPassword As String Dim strSQL As String strOldPassword = DLookup("[password]", "tblUser", "[LoginID] = '" & Me.List25 & "'") Select Case strOldPassword Case Is = Me.Text10 // Is this...
  15. G

    Visa Database

    Well in the RowSource proprety of the visa dropdown-box there is a query : SELECT Visa_Category.Id, Visa_Category.Visa_Name FROM Visa_Category WHERE (((Visa_Category.FK_Country)=[forms]![Demo_Form]![Selection_Country])) ORDER BY Visa_Category.Id; So basicly it will select all the visa records...
  16. G

    Combo boxes that use the same data source

    I like that kind of solution. But I followed this instruction : "I need to ensure that each diagnosis is chosen once and only once, and that DIAG_ONE is chosen first, DIAG_TWO is chosen second, etc etc" It is not really clear what the OP expect us to do. Maybe you can try something that you...
  17. G

    Combo boxes that use the same data source

    Well you said : "Numbers must not be repeated or missed out; so it's 1; 1,2,3; 1,2,3,4,5; however many. " For me they are in order :p If you don't care about the order, just add the condition of the previous box to the where. So where Daig_number <> DAIG_1 for the second box where DIAG_number...
  18. G

    Can someone check my query please

    Here is a more practical example : Dim rs As DAO.Recordset Set rs = CurrentDb.OpenRecordset("SELECT Tbl_BespokeInspectionAreas.BespokeID, Tbl_BespokeInspectionAreas.BespokeNumber, Tbl_BespokeInspectionAreas.BespokeInspectionArea FROM Tbl_BespokeInspectionAreas WHERE...
  19. G

    Combo boxes that use the same data source

    Here is a little demo of what I think you want : http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=64542&stc=1&d=1479807975 So basically you have to select the first one first. Then for all the next options you don't have the previous options. So if you pick first 4 the...
  20. G

    Can someone check my query please

    Ok, sorry I should have seen that you try to use Docmd.RunSql... that command is only for query's that make changes to the database (insert/delete/update) What you need is this : Dim rs As DAO.Recordset Set rs = CurrentDb.OpenRecordset("SELECT Tbl_BespokeInspectionAreas.BespokeID...
Back
Top Bottom