Search results

  1. A

    sum array multiplication between columns

    Solution: Please ignore the code written in the first post of mine (The nested for loop doesn't perform as intended). The solution given below assumes that the array's elements have indexes "0","n" example: second element of the second column will be 1,1. So here is the code: ' redimenion the...
  2. A

    sum array multiplication between columns

    Hello, I have imported some numerical values into a 2x2 array with dimensions (n-1) rows and 5 columns, where n is an integer > 2. What I am trying to do is multiply all elements from two columns of the array, say column 4 and column 2 and sum the result. My code works, but (naturally you may...
  3. A

    Enable a Form to be active only at certain time range.

    Try the following code when your form loads: Private Sub Form_Load() Dim timevar As Date timevar = timevalue("15:00:00") If time < timevar Then MsgBox "Try opening this form after 15:00", vbCritical, "Error" DoCmd.Close acForm, "Form", acSaveNo Else End If End Sub Of course you will have to...
  4. A

    How to hide some of subform textbox

    Your code has to be written when the main form loads If I suppose that HeadRejectMachF is your main form and DetailRejectMachSF is the subform then: Private HeadRejectMachF_Load() Forms!HeadRejectMachF!DetailRejectMachSF!txtpostin_gdate2.Visible = False End Sub Also try using underscores (_)...
  5. A

    How to hide some of subform textbox

    Try this code for every non-visible texbox in your subform, when the Parent Form loads: Forms!Subform name here!texbox name here.Visible = False Example: Forms!Parent_Form!SubForm!nametextbox.Visible = False
  6. A

    Combo box linked to Hyperlink

    I cannot guess what your combo boxes will contain in order to open a specific file from a selected directory. What might be helpful to you, is to design a button and write a few (or more!) lines of VB code under the Onclick event procedure. Your code will look like: Dim File As String File =...
  7. A

    inputbox to update value(s) in the table

    Success Well, after a number of efforts, the solution was really simple: My combobox was referencing column 0 and not 1 that has the usernames :banghead:. I found it out by simply writing the following code to see what the "original" WHERE clause returned: dim test as string test =...
  8. A

    inputbox to update value(s) in the table

    Hi again. Let me recapitulate what I have in terms of code that it does not do what I intent to do: Dim SQL as string SQL = " UPDATE tbl_loginTable_users " & _ " SET password = '" & chpass2.Value & "'" & _ " WHERE username = '" & Forms!LoginForm!usernamecombo.Value & "'" DoCmd.RunSQL SQL...
  9. A

    inputbox to update value(s) in the table

    Hi Galaxiom, thank you for your reply. I followed your advice but unfortunately nothing happend. By that I mean, no error message and no changes in the table. Code: Dim askpass As String Dim strSQL As String askpass = InputBox("Enter your new password", "Password change input")...
  10. A

    inputbox to update value(s) in the table

    Sorry for refering to an old post (better though than starting a new thread...), but I have the same problem here: although the code "works", it does not update the table. Code: askpass = InputBox("Enter your new password", "Password change input") DoCmd.SetWarnings False DoCmd.RunSQL "UPDATE...
  11. A

    Open form using Input box value

    Dear pr2-eugin, thank you very much for your kind advice. Yes you are perfectly right with your last comment. It is clear for me that it will be better to use a query with a like operator instead of the input box, since the NET number that has to be entered is 10 digits long (not my idea!) and...
  12. A

    Open form using Input box value

    Sorry for troubling you with my latest question. I wrote it a little bit fast, because I had to leave my office... Anyway I was referring to query design, where you can enter in certain or all fields of a selected table the "like" operator in the criteria of a query to use a screen request for...
  13. A

    Open form using Input box value

    Just a quick question about the same problem: Is it possible instead of using the input box to enter a value, to have everything in the open form command using something similar to the Like[enter net no] query criterion in the where option of the command? Thank you, Alex.
  14. A

    Open form using Input box value

    That did the work sir! I understand that although I know how to do something, I am having some difficulties with the systax of string values. I guess, I have to practice some more. Thank you for your advice for the fliter. The value is unique, so that should not pose a problem. However a good...
  15. A

    Open form using Input box value

    Thank you very much for your reply. I knew there was something wrong with the openargs, thus my last attempt with the where condition. Anyway I've used your suggestion and received the following error message: "Data type mismatch in criteria expression" Just for your information the net...
  16. A

    Open form using Input box value

    Hello. I have a form in my db (call it MAIN) containing various fields from table tbl_main. What I want to do, is to create a button on my switchboard in order for the user to open the form in read only mode, based on a value for “net no” that he/she will give as an input. This value...
  17. A

    Select multi entries in a combobox list

    Thank you for your reply. Listbox was going to be my second option, so I guess I'll give up looking for an alternative to the combo box itemdata(). Thanks, Alex.
  18. A

    Select multi entries in a combobox list

    Hello all. I was wondering if there is a way to include more than one entries from the list of a combobox with a single command. For example, writing the following using the itemdata() property could be a solution: If Dis_perc_combo.Value = [Dis_perc_combo].ItemData(0) Or _...
  19. A

    dcount from inputbox

    That worked! Thank you very much sir! alex
  20. A

    dcount from inputbox

    Hello, I have the following code which always returns 0 (zero) value for check variable, although the value entered in the input box exists in the table (tbl_items): Dim ask As String Dim check As Double ask = InputBox("Please Enter a valid code", "CODE REQUIRED") check = DCount("[CODE]"...
Top Bottom