Search results

  1. A

    Overflow

    Hi, I have a question. dim num as Long num = 123000234123 the message is giving out "Overflow". Do we have another datatype instead of the "Long"? I know the "Long" datatype cannot support all digits (123000234123). Its range is 2,147,483,648 to 2,147,483,647. Does anybody know how to solve?
  2. A

    Query Parameter

    Dim db As DAO.Database Dim rs As DAO.Recordset Dim qry As DAO.QueryDef Set db = CurrentDb Set qry = db.QueryDefs![qry2] qry.Parameters![vendor] = "ibm" qry.Parameters![id] = 001 Set rs = qry.OpenRecordset docmd.openquery "qry2" It works...
  3. A

    Am/pm

    Hi, I have a question. d = now Month(d) Day(d) Year(d) Hour(d) Minute(d) Second(d) I know that right(d,2) can retrieve the last 2 chars, AM/PM However, do we have a function to retrieve AM/PM value? Thanks.
  4. A

    Add filter in the shortcut

    Thanks. I got it
  5. A

    Add filter in the shortcut

    Could you give me an example for /cmd? I searched in google, there is NO example for working /cmd. Do you have one for me? Thanks.
  6. A

    Add filter in the shortcut

    Hi, In the my database program, I write the code to create the shortcut, and then send the shortcut (attached) through the Outlook to the people. I know how to create the shortcut. But, I want to add the form and filter in the shortcut. "C:\Program Files\Microsoft...
  7. A

    Path

    Hi, Ans1: MyShortcut.TargetPath = "C:\Program Files\Microsoft Office\Office10\Msaccess.exe " Ans2: MyShortcut.TargetPath = "C:\Program Files\..\Msaccess.exe " The Ans1 works fine. The Ans2 doesn't work. I want to work the Ans2, because every user machine's Office path is different. For...
  8. A

    Change color of Record Selector

    Hi, In the form, I set the white background color. But, the record selector is grey color. Can I change the white color of the record selector bar? Thanks.
  9. A

    Check Security Database

    Hi, I want to write the code, the code can check whether or not the database file need to open with security. I have a combo box to input the path and database filename, but I don't know the database whether or not it needs to open with security. I don't want to open it, and then check it...
  10. A

    Validation Rule

    Hi, I have one field which set the validation Rule. Validation Rule: >0 So, the value must be greater than 0. I enter 5, then go to next field, and then go back to change 5 to Null (blank). Then the error message come out. I want to allow the blank in the field after I change the value...
  11. A

    Undo Delete Records

    So, what method I can prevent to delete all records. Me.allowdeletion = False But, I want to delete record if the user doesn't select all records. Does anyway to do that?
  12. A

    Undo Delete Records

    Hi, I have a question. How can I make undo delete records? When the user select all the records, and then click "delete" key. Then it will delete all records. I want to setup that there must be at least 1 record left. If they select all the records and delete all, then it will undo delete...
  13. A

    Disable all menu except Right Click Mouse

    Hi, For i = 1 To CommandBars.count If (CommandBars(i).name <> "Right Click Mouse") Then CommandBars(i).Enabled = False End If Next i I tried to use this code. However, right click mouse is disable. How can I disable all menus except the right click mouse option? Thanks.
  14. A

    Increase the time by 1 second

    Hi, I have a question. I want to make a action on every 2 hours on the form. On form time interval, I set 1000 Private Sub Form_Open() a = "00:00:00" End Sub Private Sub Form_Timer() On Error GoTo Err_mess timelabel = CDate(a) + cdate("00:00:01") Err_mess: End Sub I...
  15. A

    Menu Bar

    Hi, I have a question of creating a few menu bars. I made 3 menu bars. When the user log in the database, the database program will detect the user name, and then output his own menu bar. It works fine. However, I got a problem, when I created the first menu bar, the menu bar have control...
  16. A

    Filecopy

    Hi, I have a question. Function makecopy() FileCopy CurrentProject.Path & "\account.mdb", "C:\backuptemp.mdb" End Function It doesn't work, the error message give out Permission Denied How can I make the copy itself? Thanks.
  17. A

    Open the invisble query

    Hi, I have a question. In VBA, can we select the object, query, and then open it as invisble status and then close it? I just know that Docmd.openquery "qry1" docmd.Close acQuery,"qry1" But, I want to make it in the invisible status, nobody read it on the screen. Can we do that? Thanks.
  18. A

    open the same database on the computer

    Hi, I have a question. I created the database "Account". I open "Account" database, and then I go to the file and open it another one. Totally, I open twice on this file. I want to do that: When I open the "Account" database, the program check whether or not the Account database was already...
  19. A

    Modify Query

    Dim strSQL As String strSQL = "SELECT [Company Name],[Vendor Name],[Account],[Statement Number],[Amount] from [Statements] " Dim cat As New ADOX.Catalog Dim cmd As New ADODB.Command Dim qry As ADOX.view cat.ActiveConnection = CurrentProject.Connection Set cmd = cat.Views("Statement...
  20. A

    lock the field

    Hi, I create the datasheet form, I know how to lock the field, but it lock the whole column of the field. I want to lock the field except the last record field only. Can I do that? eg. ID Field1 Field2 1___a______b 2___c______d 3___z I want to lock the field2 except the ID=3 Please let me...
Back
Top Bottom