Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2013
    Posts
    8

    Question Get split form behaviours without using a split form

    Hey all! Since I last posted I've picked up some basic SQL and VBA and feel pretty confident with it on the level of an intermediate beginner, at least when it comes to VBA for Access. The issue I've run into now, though, is that I want to create a form (frmEdit) with several elements. The primary purpose of this form will be to display existing records from tblMain (the only table in the database) in order that they can be edited. Here's how I want it to work.

    1. The form will have three "sections": a search area, a subform (subMain) displaying those search results, and a number of controls bound to tblMain that display the contents (ProjectID, FirstName, LastName, StartDate, EndDate, etc.) of the active record. The user can then edit either through subMain or through the bound controls.

    2. The user "filters" records through a series of controls (combo boxes, text boxes, check boxes, and option groups) in the search section. All the records that meet the user-provided criteria then appear in subMain (this has already been accomplished). I've set up 4 buttons (First, Previous, Next, Last) that the user can use to cycle through the records that are left after filtering.

    3. Now for the part where I'm having difficulties: When the user clicks a cell on subMain (say, the "FirstName" cell for John McFie's record), I want the record that that field is a part of (John McFie's record) to become the record that is showing in the bound controls. Similarly, as the user cycles through the records in the bound controls using the 4 buttons described above, I want the subform to highlight the record that is showing in the bound controls, or at least the focused field in those bound controls (i.e.: when ProjectID has the focus, I would like the corresponding ProjectID to be highlighted on subMain).

    So basically, I'm asking how to make my form and subform behave like a split form--to fully sunchronize the two of them. The reason I don't want to use a split form is because I don't freaking understand them =P That said, if someone can provide me with an assurance that a split form would provide the functionality I need, then I would consider using one. But they're not as customizable and I've had a lot of trouble convincing them to do what I want them to.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    I also found the split form lacking when I first encountered it. I have yet to implement it in any db. However, I have seen other db's that use it successfully.

    I explored the split form and also something like what you want and rejected both. What I have now is a form/subform arrangement where no data is accomplished through either. The main form has unbound controls for entering search criteria then I use VBA code to either filter the subform or to go to specific record of subform, depending on which controls user enters criteria into and which buttons are clicked. The subform is in Datasheet View. Also, buttons on the main form will initiate tasks (edit, print, view) for selected subform record or the filtered recordset. Clicking on specific record of subform will open another form for viewing (not editing) details of record.

    What you want will require form and subform to not be linked. Code will either set Filter and FilterOn properties or go to specific record.

    Controls used to enter filter criteria cannot be bound to fields.
    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
    Join Date
    Mar 2013
    Posts
    8
    June,

    That actually sounds a fair bit like what I've got set up right now. I don't care for it. I think I'm going to have to bite the bullet and deal with the limitations of splitforms in exchange for their capacity to accomplish what I'm trying to. If it were just for me, this wouldn't be an issue, but I'm designing frmEdit for a group that doesn't know much about the ins and outs of access. An interface with little to no guesswork is paramount here.

    Thanks for your help!

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

Similar Threads

  1. Replies: 5
    Last Post: 06-18-2013, 10:40 PM
  2. Replies: 3
    Last Post: 05-02-2012, 10:13 AM
  3. Help with a split form.....Please!
    By Kevo in forum Forms
    Replies: 3
    Last Post: 02-22-2012, 06:32 PM
  4. Replies: 1
    Last Post: 12-12-2011, 01:58 PM
  5. Backing out of a split form
    By Reaper in forum Programming
    Replies: 9
    Last Post: 11-22-2011, 02:23 PM

Tags for this Thread

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