Results 1 to 10 of 10
  1. #1
    Haleakala17 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    36

    Read/Write Access in Cells on Forms

    I am requesting if anyone knows how to make a cell in a form Write access if the cell contains no data. In other words if there is a blank cell on a form I would like a user to have "Write"
    Acess to enter data in the blank cell. In addition, if a cell in a form contains data in it a user will not be able to write in it, it will be Read Only. On attachment is a Winzip file using visuals.

    Regards,

    Haleakala17

    Attached Files Attached Files
    Last edited by Haleakala17; 11-20-2012 at 04:48 PM. Reason: Upload File

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    By 'cell', do you mean a textbox?

    Will need code to manage the textbox Enabled, Visible, TabStop properties.

    Use the form OnCurrent event. Example:

    Private Sub Form_Current()
    If Not IsNull(Me.textboxname) Then
    Me.textboxname.Enabled = False
    Me.textboxname.TabStop = False
    End If
    End Sub
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Haleakala17 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    36
    June7,

    Unfortunately the VB script you sent me did not work. After I entered data in the textbox, it prevent me from entering data in the other records in the same textbox. the textbox now is highlighted in light color grey.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    This changes the property for all instances of the textbox but the code should run when moving to another record. Is the form in Continuous or Datasheet view? Want to provide db for analysis? Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Haleakala17 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    36

    My Example

    Here is my database on zip file. take a look at the __Property form. On the parent form I am trying to apply the read and write access to the fields name County Shapefile Gross Acres, Township, Mineral Severance Tract, and Unit name.

    Thank You
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Should have provided db with the code you attempted, even if it doesn't work. Just realized in the original suggestion forgot to include the ELSE. This is a different syntax that doesn't require ELSE. Don't need to set TabStop property after all.

    Private Sub Form_Current()
    Me.ParcelNumber1.Enabled = IsNull(Me.ParcelNumber1)
    Me.County_Shapefile_Gross_Acres.Enabled = IsNull(Me.County_Shapefile_Gross_Acres)
    Me.Township.Enabled = IsNull(Me.Township)
    Me.Mineral_Severance_Tract.Enabled = IsNull(Me.Mineral_Severance_Tract)
    Me.Unit_Name.Enabled = IsNull(Me.Unit_Name)
    End Sub
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Haleakala17 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    36
    June7,

    Thank you very much! You are correct I should have sent you my db in my intial message. I marked this thread as Solved and gave this an excellent rating. Question . . . is there any resourceful websites that you know of so that I can increase my VBA skills in Access?

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848

  9. #9
    Haleakala17 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    36
    Orange,

    thank you for the websites! I appreciate it

  10. #10
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Glad to help. Good luck with your project.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. C program: read/write Access database
    By serendipity1276 in forum Programming
    Replies: 1
    Last Post: 08-15-2011, 01:15 PM
  2. Replies: 1
    Last Post: 05-11-2011, 02:51 AM
  3. Some Can Read; Some Can Write
    By cassidym in forum Security
    Replies: 3
    Last Post: 08-19-2010, 02:19 PM
  4. ODBC table read to blank Access table write
    By dibblejon in forum Access
    Replies: 2
    Last Post: 03-10-2010, 08:39 AM
  5. Replies: 2
    Last Post: 10-19-2006, 04:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums