User Profile

Collapse

Profile Sidebar

Collapse
Rafik
Rafik
Last Activity: Nov 12 '09, 12:11 AM
Joined: Dec 6 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Rafik
    replied to Automatic creation of records
    Sorry NeoPa
    Got a bit lost there
    We seem to have solved the problem of copying and pastiong a record on the click of a tick box INSPECTION DONE Y/N. The problem is we need to somehow change the code to take account of the new date when inspection is due and make the COMMENT field blank.
    The code for copy paste is
    Code:
    Private Sub InspectionDone_Click() 
    If Me.Dirty Then Me.Dirty = False 'This will save the current record
    ...
    See more | Go to post

    Leave a comment:


  • Rafik
    replied to Automatic creation of records
    Oldbirdman,Chip R,Donrainer,Neo Pa
    Any new ideas on the old question of Creating new record in a table
    Rafik
    See more | Go to post

    Leave a comment:


  • Rafik
    replied to Automatic creation of records
    Oldbirdman
    It copies and pastes the information
    but does not change the date and niether does it leave
    the comment field blank

    Here is the code i put in
    Code:
    InspectionDone_Click() 
    If Me.Dirty Then Me.Dirty = False 'This will save the current record if any changes 
    'Select the record now being edited 
    DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 
    'Copy the Record
    ...
    See more | Go to post
    Last edited by NeoPa; Apr 16 '09, 05:10 PM. Reason: Please use the [CODE] tags provided

    Leave a comment:


  • Rafik
    replied to Automatic creation of records
    Sorry also the comment box is not blank
    Rafik
    See more | Go to post

    Leave a comment:


  • Rafik
    replied to Automatic creation of records
    Thanks Oldbirdman
    It works except the date does not change

    Here is the code i put in
    Code:
    Private Sub InspectionDone_Click()
    If Me.Dirty Then Me.Dirty = False 'This will save the current record if any changes
    'Select the record now being edited
    DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
    'Copy the Record
    DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
    'Paste append
    ...
    See more | Go to post
    Last edited by NeoPa; Apr 12 '09, 06:56 PM. Reason: Please use the [CODE] tags provided

    Leave a comment:


  • Rafik
    replied to Automatic creation of records
    Oldbirdman
    Thanks for all that
    I will give it a try but the only thing is i have no button to create a new record
    but my intention was for the record to be created when the YES/NO click box iof the INSPECTIONDONE field is clicked a new record is created.
    Would there be any changes to the code.
    Rafik
    See more | Go to post

    Leave a comment:


  • Rafik
    replied to Automatic creation of records
    Oldbirdman
    Logically yes as long as the first field which is the ID changes as an index key
    and the comment field is left blank, so that on inspection any new comments are typed in.
    Also it would have been easier to do what u suggest but in view of the many properties being inspected and various people inputting the data, an update via a click would be more efficient
    Rafik
    See more | Go to post

    Leave a comment:


  • Rafik
    replied to Automatic creation of records
    Sorry Oldbirdman
    I am very new to this code businees and copied all this code from Neo and Chip anyways let me put you in the environment i am working in.

    I am trying to create a database for the inspection of properties.
    I have a created a table and form with the following 6 fields.

    InspectionID Index Primary Key
    PropertyAddress Address of the property Text
    DateOfInspectio n...
    See more | Go to post

    Leave a comment:


  • Rafik
    replied to Automatic creation of records
    Hi OldBirdman
    Tried changing code as below but still not working
    Code:
    Private Sub InspectionDone_AfterUpdate()
    Dim strSQL As String 
    strSQL = "INSERT INTO destinationTable" & _
    "(field1, field2, field3,  field4, field5, field6,)" & _
    " VALUES (" & value1 &", " & value2 & "Format(DateAdd(""m"",3,[Inspection Date])),"dd/mm/yyy"
    ...
    See more | Go to post
    Last edited by NeoPa; Apr 12 '09, 06:53 PM. Reason: Please use the [CODE] tags provided

    Leave a comment:


  • Rafik
    replied to Automatic creation of records
    Chip,Neo
    I am struggling to make this work,can you please guide me step by step as to how to put the code in and if the code is correct.

    My form looks like this in datasheet view

    PropertyID PropertyAddress InspectionDate InspectionBy InspectionDon
    1 Gedding Road 73 08/04/2009 Ash 0
    2 King Edward Road 25 06/04/2009 Salim 0
    3 Trevino Drive 61 10/04/2009 Ash 0


    The...
    See more | Go to post
    Last edited by NeoPa; Apr 12 '09, 06:52 PM. Reason: Please use the [CODE] tags provided

    Leave a comment:


  • Rafik
    replied to Automatic creation of records
    Thanks for that Chip
    I want the running of the code to be initiated when the Y/N box is ticked.

    My form is as follows
    CODE Key
    PROPERTY Address
    INSPECTION DATE Date
    INSPECTION DONE Yes/No tick box
    INSPECTION BY Lookup
    COMMENTS Memo

    Once an inspection has been done...
    See more | Go to post

    Leave a comment:


  • Rafik
    replied to Automatic creation of records
    Thanks Neo
    I will try using the code, but please tell me where to stick the code in, is it in access ? On the form ? Through the code builder ?
    Also do i copy the code exactly as given?
    Sorry to be such a pain but as i am very new to this code business all help will be very much appreciated.
    Rafik
    See more | Go to post

    Leave a comment:


  • Rafik
    replied to Automatic creation of records
    Thanks for all that, but it seems to complicated for me as i have no knowledge of VB.
    Will have to learn VB to solve this problem.
    Also may i ask u if it is possible to run a macro to solve the above problem?
    And if so how would one go about it
    Thanks
    Rafik
    See more | Go to post

    Leave a comment:


  • Rafik
    started a topic Automatic creation of records

    Automatic creation of records

    I seem to have solved the problem of pop up reminder but still need some help with automatically creating records once a tick box is clicked.

    My form is as follows
    CODE Key
    PROPERTY Address
    INSPECTION DATE Date
    INSPECTION DONE Yes/No tick box
    INSPECTION BY Lookup
    COMMENTS Memo

    Inspections are done quarterley
    Once an inspection is done i need a new record to be added...
    See more | Go to post

  • Rafik
    replied to Reminders
    I seem to have solved the problem of pop up reminder but still need some help with automatically creating records once a tick box is clicked.

    My form is as follows
    CODE Key
    PROPERTY Address
    INSPECTION DATE Date
    INSPECTION DONE Yes/No tick box
    INSPECTION BY Lookup
    COMMENTS Memo

    Inspections are done quarterley
    Once an inspection is done i need a new record to be added...
    See more | Go to post

    Leave a comment:


  • Rafik
    replied to Reminders
    Datasheet view and yes the date does appear.
    See more | Go to post

    Leave a comment:


  • Rafik
    started a topic Reminders

    Reminders

    Hi
    I am very new to access.
    Can anyone help me to create a pop up reminder
    one month prior to an event, and once the event has
    been completed then to tick it off as completed and
    then automatically to remind me again after a year
    Thanks
    See more | Go to post
No activity results to display
Show More
Working...