Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2020
    Posts
    18

    Sending data from a split form

    Hi, I'm pretty new to access (I have about a month using it). I have a split form that is connected to a query where there is a selected row and I want to send that information to another table using a button. Can anyone help me out with this? I tried using a macro and it didn't work. I'm also fiddling with making the query an append query but I don't know if that is helping me any.



    Thank you so much in advance.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    Not really in a position to help, but please explain why you want to do this? Reason is the normal answer would be just to join the two tables

  3. #3
    Join Date
    Feb 2020
    Posts
    18
    If there is an easier way to do this then I would love to try it out. So the split form pulls information from a table (it's about 300 rows of inventory parts). I need to be able to select say 5 of those parts and print them off. So what I was thinking is just sending those selected rows to a different table to be able to print and then it would disappear after the printing job got done.

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Making a new temp table isn't the correct way to do this.
    Create a query to filter the data as required for your report.

    For example you could add a Boolean (yes/no) field to your table. Call it Tag or similar.
    Add this to your split form.
    You can now select required records by clicking the checkbox.
    Your report would then use a query or record source filtering for Tag=True.

    NOTE: You will need to run an update query on closing the report or the form to reset all Tag values to false.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    Join Date
    Feb 2020
    Posts
    18
    Will the query change any of the data in the table? Because whenever I've used queries they seem to do this. So I should have a split form based on the query? I understand the boolean field and that seems much easier. Thank you. I've also never used queries to subset tables so I'll need some help with that but I will send an update in a few hours.

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Select queries are used to view data and will not change any records unless a user edits them.
    If that might be an issue, you can make the query read only.
    However as the idea is to open a report filtered to selected records, users can't edit the data on the report anyway.

    For info, there are other types of query used to modify data - append, update and delete queries

    From what you've said, the form should be based on the table...then you would use the form to filter the data for your report
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  7. #7
    Join Date
    Feb 2020
    Posts
    18
    How do I use the form to apply the query to filter the table? I’d like to make a check box on the bottom portion of the split form to select the inventory I want but that would mean editing the table correct?

    I will also need to update the quantity field because they will be requesting a certain number of a part. Would I use an append query for that?

    I'll attach a picture that I have below. I don't have all the rows in there because it's sensitive information.

    1) But the upper portion of the form will update based on whatever row I highlight in the bottom. I'll like to have a button on the upper portion that would send that data to another form (table?).
    2) There would be about 5-10 rows and then I'd need to print that form and have it reset.

    But I'm just trying to solve one problem at a time.

    Thank you so much again.

    Attachment 41182

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    1. Yes. You need to edit the table structure. Open the table in design view then add the Tag field with datatype Yes/No. Then add that field to your split form.
    2. There are many ways of filtering the form to only show the tagged records (though this isn't necessary for the report itself)
    The simplest method using a command button cmdFilter is probably this

    Code:
    Private Sub cmdFilter_Click()
    
    Me.Filter="Tag=True"
    Me.FilterOn=True
    
    End Sub
    To create your report, again there are several approaches e.g. Use a query and add all the fields you need from your table including the Tag field.
    In the criteria row, set the Tag field to True. Use that query for your report record source,
    Alternatively do the same thing using SQL in which case no query is needed.

    One more thing. Split forms can be difficult to work with if you need to anything more than minor changes.
    If that is the case, you may be better off using my emulated split form. See http://www.mendipdatasystems.co.uk/e...orm/4594398119
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Search Multiple Data Using Split form
    By Vanita in forum Access
    Replies: 3
    Last Post: 05-30-2019, 10:02 AM
  2. Split Form For Data entry
    By OneToLearn in forum Forms
    Replies: 3
    Last Post: 10-22-2012, 01:49 PM
  3. Sending Data From one form to another
    By Anira in forum Forms
    Replies: 1
    Last Post: 06-29-2012, 01:05 PM
  4. Sending data from form to multiple emails
    By GeorgeB in forum Access
    Replies: 11
    Last Post: 01-09-2012, 04:23 PM
  5. Sending out the front end of a split database
    By Huddle in forum Import/Export Data
    Replies: 3
    Last Post: 07-20-2010, 08:47 AM

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