Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2010
    Posts
    13

    Unanswered: Access Forms Question for a Newbie

    Hi all,

    I was asked if I could put together a little Access database to help someone get away from spreadsheets. One of the requirements was to have a Form to be able to enter the data. I thought no problem, until I first began looking at the different items within Access 2007.

    I have a Visual Basic/MySQL background and would typically make a VB form and communicate with the database through command buttons. From a quick look on Google, I see a bunch of forms that traverse each record one by one. Would I need to create separate forms to insert records into the various different tables? For instance, let's say I believe that 5 tables will be needed, would I need to create 5 separate forms just to simply add/update/delete data from each, or can I communicate (and still display results) within one single form?

    Anyways, hope my question makes sense. I'm just a little confused getting going with Access instead of VB/MySQL.

    Thanks!

  2. #2
    Join Date
    Oct 2009
    Posts
    340
    a form has a record source

    that record source can be a table or a query

    the query can join tables - - assuming there is a relational cross referencing field to logically join them together.

    thus if a joining query is feasible a form can be the source of data entry to multiple tables via a query of multiple tables - - or one can use a form/subform relationship to enter data into multiple tables. it depends on the way the data is normalized.

    bottom line; one can do with Access anything that can be done via visual.net with mysql

  3. #3
    Join Date
    Jan 2010
    Posts
    13
    Thanks for the info! Glad I can do the same things...just trying to figure out all the differences when creating the forms.

    Another quick question...I had always assumed that when using Access 2007 that when using the Add Record button that you wouldn't be required to enter any code. Is this true? I just created a simple table named "Project" with ProjectID, and ProjectName fields. I then created a form and removed the ProjectID entry form as I don't want that to change. After entering a button (Add Record) from the menu, I thought I was done. But I don't think my table got updated? In short I just want to know if I need to add my own VB code in .

    Thanks!

  4. #4
    Join Date
    Oct 2009
    Posts
    340
    a form, sourced on a table, will be either continuous or single mode; if single record mode there will be by default navigation buttons at bottom to advance thru records including adding a new record.

    this functionality can be duplicated with a command button that is set up to go to a new record.

    when you are adding/editing data into a record (new or not) the icon on the left will turn into a pencil. if you close the form while that is a pencil - the form must decide whether or not you intended to complete that record. Thus it might not add the data. The safe thing is to tab forward or backward to another record - then for sure it is in the table.

    If you believe the user experience will be to close that form while in the pencil/write mode - - and that this data is not saving to the table - - then you can force it to write by changing the code in the button's onclick event to: me.dirty=false

    In 07 a command button that is set up specifically to close form includes this. But if you are closing another way that may be your cause of not entering the data....look directly into the table itself with some test records to be sure....

  5. #5
    Join Date
    Jan 2010
    Posts
    13
    Thanks again,

    One thing I find weird is when I delete an entry from the Table that it is not immediatly removed from the Form.

    Right now I have two tabs: Project (table), and Project Form (form).

    I added a few entries using the form, went to the Project table, refreshes, and noticed they appeared. I then deleted the records from the Table, went back to the Form, and noticed they appear as "#Deleted" now. Is there a work around for this? Can I retrict access for the user to the Project table?

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •