Search results

  1. D

    Sum of a Calculated Field

    @ vbaInet Ah I see. I normally put the calculation in the Query not the form. The form's data source is the Query not the Table. Therefore the sum() comes from the line total field not the calculation directly.
  2. D

    Eliminate Duplicates

    Email harvesting?
  3. D

    SendObject to fill out addressee

    Oops, macro not VBA. Sorry. here is the code in VBA. Maybe someone can change it to a Macro for you. Dim EmailAddress, Subject, MessageText 'EmailAddress = "my@mail.com" EmailAddress = Email 'Where Email is the field Subject = "Subject line goes here" MessageText = "Line 1...
  4. D

    Sum of a Calculated Field

    You need to use the name of the text box in your formula. That is: If the name of the text box in Detail is "RetailCost", the formula in Footer should read =sum([RetailCost]) The way you have written it, the Sum is looking for [NoItems] and [Price].
  5. D

    Refreshing Forms (Via Embedded Button)

    Private Sub RefreshButton_Click() Me.Requery End Sub
  6. D

    convert long decimal number to 2 decimal places

    Field3 = Field1/Field2 If field1 = 0 then answer must be 0 If field2 = 0 then answer must be 0 If both fields <> 0 the field3 = field1/field2 =iif(field1=0,0,iif(field2=0,0,field1/field2))
  7. D

    Getting a number to appear with 2 decimal places

    Must be Double else decimal not shown Fixed = 1000000.00 Standard = 1'000'000.00
  8. D

    log in once

    Create groups for you users. i.e. Group 1 = Admin, Group 2 = Power User, Group 3 = Data Caputure Slaves Have a hidden form open when a user logs on In that form have an unbound field "Group" that gets the group number for that user. In you form/s have a Select Case Select Case...
  9. D

    Load form on startup in Access 2007

    To set any form as startup the next time you open the database: CurrentDb().Properties("StartupForm") = "TheNameOfYouFormGoesHere" I have the following on my "Main" form. When ComboBox is changed the following Function is called: Function StartupForm() Select Case Forms!FormMain!ComboBox...
  10. D

    Help in VBA

    Ahhh, I always forget NZ. I had a nice validation for missing fields and NewRecord, I just can't find it. Basically there is a button at the end of the form that speciffically check all fields are filled in and then allows a new reord. I had to do this for a database where the historical data...
  11. D

    how delete current record

    I guess you want to reuse the code in other forms? Make a Module like: Function DeleteARecord If MsgBox("Do you wish to delete this record?", vbYesNo, "Delete Confirmation") = vbYes Then If MsgBox("Are you SURE you want to delete this record?" & vbCrLf & _ "This will permanently delete...
  12. D

    Allow Form 'on load' to finish before continue

    Does OnOpen not run before the form "Loads"?
  13. D

    Help in VBA

    Just a quick comment Don't use IsNull Rather use If Len(Me.textbox1 & "") = 0 Then There is a difference between Null and Zero Length especially with Dates.
  14. D

    Trusted Location

    Set the app path as a trusted location in Package Solution Wizard when making your installer. Additional Registry Keys Root = CU Key = Software\Microsoft\Office\12.0\Access\Security\Trusted Locations\MyApp Name = Path Value = c:MyApp Root = CU Key =...
  15. D

    30 day trial & Registration

    I have written a very simple form that allow a user to register their database. Very simple (and probably easy to crack). You hake the changes where neccessary. How it works: On opening the database tow String Vaules are written to the registry. Version and DateInstalled DateInstalled lets the...
  16. D

    Setup Form with Backup Button - Help!

    Sorry I took the code out and made it a Module a while back. the code I gave was from an updates form. The code goes in On Open. Make the form as above. Then create a Module and use the following code: Option Compare Database Option Explicit Function Restore() Dim str As String Dim buf As...
  17. D

    Setup Form with Backup Button - Help!

    oops my post disapeared The first part of the code closes all open forms which "close" any open forms. F_Restore is not linked to any tables. It waits 2 seconds to give the tables time to "close" completely. Then files are replaced. For the F_restore form you need the following: Option...
  18. D

    Setup Form with Backup Button - Help!

    I did acutally look into completely closing the front end and opening a second front end that runs the restore code. But some idiot at MS forgot that once a database is closed the code stops running. Batch files? Yes I guess.
  19. D

    Setup Form with Backup Button - Help!

    Yes, you need to create the F_Restore form with the code in the timer. The first part of the restore code closes any open forms. Then opens F_restore form. Then waits a second or two. Then runs the restore code. The reason: If a form has access to a table, the code stalls because the backend...
  20. D

    Setup Form with Backup Button - Help!

    I assembled the code specifically for a multi file backend. The code makes a new folder. The folder name is the current date and time. Then it copies files from the source folder to the created folder. To restore it just copies files from one folder to another, after making a backup.
Back
Top Bottom