Search results

  1. R

    Difference between two dates

    Hi, i made a form where i calculate difference between dates. .............. Dim tyears As Integer, tmonths As Integer, tdays As Integer tyears = Year(Me!txtdata1) - Year(Me!txtdata2) tmonths = Month(Me!txtdata1) - Month(Me!txtdata2) tdays = Day(Me!txtdata1) - Day(Me!txtdata2) If tmonths < 0...
  2. R

    Pass-through query access with value from form textbox

    Hi, i want to make pass-trough quey in access with value from a textbox. Everything is ok except with part where i want to bring value from textbox. Update aa SET aa.x1 = ac.x1, aa.x2 = ac.x2, aa.x3 = ac.x3 from Table1 as aa INNER JOIN Table2 as ac ON aa.y1 = ac.y1 AND aa.z1 = ac.z1 WHERE...
  3. R

    Copy front end with linked tables converted to local

    Hi, I want to make a copy of access front end on close with all linked tables converted to local. Any ideea? Thank you in advance!
  4. R

    Data type in SQL Back End

    Hi, I used SSMA to migrate my access back end into SQL server and i linked tables from SQL to my access front end. All my columns from access tables with data type date() now are datetime2. I changed all datetime2 in date so now i have something like 2018-07-04. How can i change style of...
  5. R

    vba to change region Format

    Hi, anybody can help me with vba code to change regional Format ? For example i want to put on load event of first form to change regional format of computer to Romanian, because the program is made to use all week days name in romanian. Thank you!
  6. R

    VBA to empty network folder

    Hi, I need to empty some network folder with vba, first i tried with vbs; Set fso = CreateObject("Scripting.FileSystemObject") Set folder = fso.GetFolder("\\192.168.4.245\Recycle Bin - Volume_1") ' delete all subfolders and files For Each f In folder.SubFolders On Error Resume Next name =...
  7. R

    VBA to open back-end network location with user/password

    Hi, I work with split database and i keep back-end on a NAS server. When i copy first time the front-end to user i need to use credentials(user/password) to open NAS share. How can i use vba with this credentials on open of front-end and on close to delete them? Something like map network drive...
  8. R

    Recordset with Date/Time

    Hi all, Please help me with this: Dim rst As Recordset, sqlstmt As String Set dbs = CurrentDb sqlstmt = "Select * from Table1 where NR = " & Me!txtnr & " and Data = #" & Me!txtdata & "#" Set rst = dbs.OpenRecordset(sqlstmt, dbOpenDynaset) If rst.BOF Then '' else '' end if I took error about...
  9. R

    Random image selection on a form

    Hi all, I need help with random image selection from a form on a buton click event.To be more explicit: i have 7 images on form, when i push one buton i want to see how each image take focus (when take focus .BorderColor =vbRed after lose focus .BorderColor =vbWhite) and after lets say 20s...
  10. R

    Do until

    Hi all, I have an attachment here much more simple but similar with my problem. If u guys can take a look and solve that loop i will be very happy :) Thank you!
  11. R

    Sound on Open Form

    Hi, How can i play a sound with event On Open Form. Thank you!
  12. R

    Loop with variable

    Hi all, i am stuck in something again :) I want to make a loop like this: Dim var1 As Variant, var2 As Variant, var3 As Variant, var4 As Variant DIm var5 As Variant, var6 As Variant, var7 As Variant, var8 As Variant Dim var9 As Variant, var10 As Variant Dim i1 As Long i1 = 1 Do Until i1 > 10...
  13. R

    Sum of Digits in a string

    Hi, is my first time here. I need help to make sum of digits from a string, something like if i have txt1 = "1234567890" to make txt2 = "1+2+3+4+ ...+0". Thank you in advance! :)
Top Bottom