Results 1 to 8 of 8
  1. #1
    mk1 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    7

    Tabular Form with a control source table

    I created a form (frmCrewing) using a table (tblCrewing) as the control source. Also in the from there are combo-boxes with the the table as the control source and code in the row source to pull information from a table (tblRawData).



    The first thing I need, is to be able to pull the 'Speed' from tblRawData based on the the 'WC' and 'Die' that is selected in the form and I would like the 'Speed' information to shown in real-time based on the trial.mdbselections made. I have an idea on how this can be done but I need an efficient method as there will be thousands of records in the from and it needs to be fast.

    Second, when info is entered in the form, I need it to be automatically transferred to the table. For example if I change 'Die1' and move over to change 'Die2', 'Die1' does not get transferred to the table, it only happens if I click the combo-box below 'Die1'.

    I have also posted a small example of the form and tables.

    If someone can give me some methods on how this can be done, I would greatly appreciate it and I tried to explain what I want as best I could but if something is unclear please just ask and I will try to clarify.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Sounds like you want a dependent (cascading) combo/list box, review: http://datapigtechnologies.com/flash...combobox2.html

    If you want to filter form RecordSource, parameterized query is one method, review: http://datapigtechnologies.com/flash...tomfilter.html

    Data is committed to table when form closes, move to another record, or run save record command.
    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
    mk1 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    7
    Thanks for the response, and sorry for the delay.

    I managed to look through the videos, and the parameterized query method was the closest method to what I need. But in my example the record source of the table is tblCrewing and the information going into 'Speed1' is coming from tblRawData. I essentially need two record sources for the form. The control-source of 'Speed1' would still be tblCrewing, so the speed information would have to taken from tblRawData and inputed into tblCrewing based on the selections made in the form.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    I don't understand. Did you mean 'record source of the form is tblCrewing'?

    A form can have only one RecordSource. The RowSource of combobox would be dependent on values selected in other controls.

    If you 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
    mk1 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    7
    I'm sorry, I did mean 'record source of the form is tblCrewing'.

    I have posted a db for analysis.
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    I don't understand your data. Maybe 2 records in tblRawData aren't enough to evaluate issue. If each WC value has only one each DIE and SPEED, why do you have 2 fields each for DIE and SPEED in tblCrewing? And if WC is unique in tblRawData, DIE is irrelevant to the selection of SPEED, just select WC.
    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
    mk1 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    7
    I added more data to the tables to help you understand, and attached another db.

    Each WC for each day is generated into the table, and the die selected can correspond to any of the WC.

    Hope this helps
    Attached Files Attached Files

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Speed is dependent on both WC and Die. Appears Die is unique for each WC

    Could have a unique ID (autonumber) field as primary key in tblRawData and just save that value as foreign key into tblCrewing.

    Why isn't WC also a combobox?

    Value selected in WC combobox would restrict choices in Die combobox. Select Die and save the PK in tblCrewing.
    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.

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

Similar Threads

  1. Replies: 1
    Last Post: 04-23-2013, 03:35 PM
  2. Control Source on Form Reading Value in Table
    By hammer187 in forum Forms
    Replies: 1
    Last Post: 10-23-2012, 02:43 PM
  3. Replies: 5
    Last Post: 06-25-2012, 02:06 PM
  4. Should forms use a table or query as their control source?
    By cheyanne in forum Database Design
    Replies: 2
    Last Post: 05-30-2012, 04:00 AM
  5. Tabular Control Code
    By benthamq in forum Programming
    Replies: 6
    Last Post: 09-12-2011, 04:16 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