Creating multiple records from one form (2 Viewers)

Well, if you're interested in some help with recordsets, maybe you could expand on the first post a little bit? Offer more specifics? I'm sure you know me by now, and I don't like to work without the specifics; any and all you can give!
 
I think perhaps a picture will do what i cant seem to do with my words... (cant really get out what i want to say today...must be getting sick or something)

anyways
note on the photo that there is only one combo box currently, the record is saved to that caseID. what i would want is for the user to be able to select different caseIDs and only have to fill in the rest of the form 1 time and click save, therefore creating at most 5 records and at least 1...

need more?
 

Attachments

  • thisismyidea.jpg
    thisismyidea.jpg
    66.8 KB · Views: 253
note on the photo that there is only one combo box currently, the record is saved to that caseID.
I understand this.
what i would want is for the user to be able to select different caseIDs
This can obviously be done with the combo box, right?
and only have to fill in the rest of the form 1 time and click save, therefore creating at most 5 records and at least 1...
Now, that underlined portion, I am not following at all. And I'm certain, that is the most important part. Got any more detail in the explanation bank? :) I do not know how the underlined portion is related to the first part of the quote. I'm at a loss with that. So YES, I need more...
 
ok. one of the combo boxes must be filled in, so there has to be at least one, and its possible that all 5 could be filled in therefore creating 5 different records. i dont know what i cant explain this correctly

so from the 5 combos there would be 5 different case numbers
case1
case2
.
.
.
case5

the only part of the records that would be different would be the case number, the rest of the records would be the same for each entry
 
Ray,

It's obvious that from the snapshot, the form is based entirely on one table. Now, maybe you should know what your words are really saying to me...
one of the combo boxes must be filled in, so there has to be at least one
At least one WHAT? Record? Go ahead and shoot me, but that's not specific!! ;)
and its possible that all 5 could be filled in
All 5 WHAT? Records? Combo Boxes? If you meant Boxes, there are only 3 boxes on the form, Ray. ;).
the only part of the records that would be different would be the case number, the rest of the records would be the same for each entry
I completely understand this part. It's quite obvious that there is an uncertainty here of how many records are going to entered; 1, 2, 3, 4, or 5. And I know you want to eliminate redundancies, and data entry, but if you don't mind, could you answer the specifics above? Thanks! :)
 
Instead of using combo boxes, would there be a way to put the info in through text boxes, and use a somewhat modified "save record" cmd button so that on the OnUpdate event or something, the values of the text boxes were stored (maybe as a string?)... Then the user can click the button up to five times saving all the same information (except for case_ID) to the records?

Or what about using a combo box to select how many records the user wants to create using the information they put in the text boxes?

I'm just throwing some ideas out here... I'm too new to VBA to be able to code these thoughts and try em out, but maybe I can inspire someone here with a little more experience?

Good Luck!
 
Really appreciate the help!!!:D:D

Ray,
It's obvious that from the snapshot, the form is based entirely on one table. Now, maybe you should know what your words are really saying to me...At least one WHAT? Record? Go ahead and shoot me, but that's not specific!! ;)
at least one combo box filled in, which will apply to one record. and you will have to forgive me, im not feeling very specific today... :(:(

All 5 WHAT? Records? Combo Boxes? If you meant Boxes, there are only 3 boxes on the form, Ray. ;)
As of now, and that photo, i dont have all 5 combo boxes on the form, you are correct. at least one combo box has to be filled in which relates to one record. if 5 comboboxes are filled in. there will be 5 records created

.I completely understand this part. It's quite obvious that there is an uncertainty here of how many records are going to entered; 1, 2, 3, 4, or 5. And I know you want to eliminate redundancies, and data entry, but if you don't mind, could you answer the specifics above? Thanks! :)

completly understand?:eek: now we are getting somewhere!! :cool::D
 
Instead of using combo boxes, would there be a way to put the info in through text boxes, and use a somewhat modified "save record" cmd button so that on the OnUpdate event or something, the values of the text boxes were stored (maybe as a string?)... Then the user can click the button up to five times saving all the same information (except for case_ID) to the records?

Or what about using a combo box to select how many records the user wants to create using the information they put in the text boxes?

I'm just throwing some ideas out here... I'm too new to VBA to be able to code these thoughts and try em out, but maybe I can inspire someone here with a little more experience?

Good Luck!

as far as the click 5 times, thats what i wanted to eliminate. one click. 5 saves.. would be ideal.

if i did allow for textboxes, they would enter the wrong cases.... kiss (keep it simple stupid) is my motto, so if i let them pick from some choices, they are less likely to mess up.

Thanks for the input~!!:D:D
 
as far as the click 5 times, thats what i wanted to eliminate. one click. 5 saves.. would be ideal.

But if they didnt have to re-select/re-enter any information, would it be that bad? Or would it be any different from what you have now?

if i did allow for textboxes, they would enter the wrong cases...

You could use combo boxes in place of the text boxes... I know there is a way to store the selected values (I was just reading an article on it, but can't seem to relocate the article). This topic is of interest to me, as I have use for a piece of code or a function that would allow for rapid data entry where there is some repetition to a point...
 
at least one combo box has to be filled in which relates to one record. if 5 comboboxes are filled in. there will be 5 records created
Well Ray, I guess I can say that this really doesn't make much sense!! :rolleyes: Why in the world would you want to go through the multiple-record entry process this way!? Are you aware that each of the combo boxes in that picture pertain to different values in a single record?? Can you tell me what sense you can make out of someone selecting a caseID, AND an expense type, AND a payment method, and then using that fact (the fact that someone selected values from 3 boxes) as criteria for saying, "OK, this tells me that 3 records need to be entered". I would sure like to hear an explanation of THAT!! Please...tell me I'm wrong about my assumption here! And if I have no ***** clue about your problem, tell me, so I don't confuse you any more. :)
 
Well Ray, I guess I can say that this really doesn't make much sense!! :rolleyes: Why in the world would you want to go through the multiple-record entry process this way!? Are you aware that each of the combo boxes in that picture pertain to different values in a single record?? Can you tell me what sense you can make out of someone selecting a caseID, AND an expense type, AND a payment method, and then using that fact (the fact that someone selected values from 3 boxes) as criteria for saying, "OK, this tells me that 3 records need to be entered". I would sure like to hear an explanation of THAT!! Please...tell me I'm wrong about my assumption here! And if I have no ***** clue about your problem, tell me, so I don't confuse you any more. :)

adam,
i just got home from work, so ill have to update the picture tomorrow, but that picture does not have the 5 combo boxes for case # that it should have. and yeah i knwo the 3 combos in the picture are for different values, those would be the same for each record. ill update the picture tomorrow so we can clear this up!! so sorry that its confusing you~! Thanks again for your help:p
 
If you update the picture, I seriously doubt I will have no answer to your problem. But, not promising anything... :p
 
Ok, let me see if I get this...

When ever any user enters data, they need to create between one and five records. Regardless of how many records they create, there are common elements in that batch. The one unique element that must exist is their Case_ID. A batch of five records might look like this:

case_ID Field_1 Field_2 Field_3 User
1 X Y Z Colin
2 X Y Z Colin
3 X Y Z Colin
4 X Y Z Colin
5 X Y Z Colin

You want to find a way to auto-populate records 2 through 5 with data from all the fields in the first record, except the Case_ID, which as we said must be unique. Correct?
 
ok so note in the picture the 5 combo boxes related to the case numbers
filling in the cases (1-5) and clicking save should return 5 seperate records each with a different case number, but the rest of the information the same.

so save should return

CaseNumber ExpenseDate ExpenseType ExpenseName Amount PaymentMethod paidTo additionalInfo

Case1 11/27/2007 equipment stuff $5.69 cash a store notes
Case2 11/27/2007 equipment stuff $5.69 cash a store notes
Case3 11/27/2007 equipment stuff $5.69 cash a store notes
Case4 11/27/2007 equipment stuff $5.69 cash a store notes
Case5 11/27/2007 equipment stuff $5.69 cash a store notes

Ideally this shuold be done with one click, if not, oh well ill have to do it some other way
hope this is becoming clearer
 

Attachments

  • Untitled-2.jpg
    Untitled-2.jpg
    49.9 KB · Views: 167
ok so note in the picture the 5 combo boxes related to the case numbers
filling in the cases (1-5) and clicking save should return 5 seperate records each with a different case number, but the rest of the information the same.

so save should return

CaseNumber ExpenseDate ExpenseType ExpenseName Amount PaymentMethod paidTo additionalInfo

Case1 11/27/2007 equipment stuff $5.69 cash a store notes
Case2 11/27/2007 equipment stuff $5.69 cash a store notes
Case3 11/27/2007 equipment stuff $5.69 cash a store notes
Case4 11/27/2007 equipment stuff $5.69 cash a store notes
Case5 11/27/2007 equipment stuff $5.69 cash a store notes

Ideally this shuold be done with one click
Ray, obviously this can be done through a recordset nav., but the question is how you want to do it. Couldn't you possibly just send the 5 combos to an array and ".AddNew" based on a conditional "IsNull" for the elements?
 
Can you post a pic of you relationships? I'd like to see where all this information goes...
 
Ray, obviously this can be done through a recordset nav., but the question is how you want to do it. Couldn't you possibly just send the 5 combos to an array and ".AddNew" based on a conditional "IsNull" for the elements?

perhaps, but like i said, i dont know recordsets!!:eek::mad::confused::confused:!! thats why i was asking! point me in the right direction!???!??!??! :D:D:D
 
Can you post a pic of you relationships? I'd like to see where all this information goes...

i dont have any relationships set up......


nah just kidding.. here ya go
 

Attachments

  • relates.jpg
    relates.jpg
    66.4 KB · Views: 178
perhaps, but like i said, i dont know recordsets!!:eek::mad::confused::confused:!! thats why i was asking! point me in the right direction!???!??!??! :D:D:D
I tried to think how you could do this, but it is tough. You might want a different structuring of the form. That might eliminate some of the headache. To get started though, maybe you could throw each control value to a variable before you add a new record??...
Code:
dim x, y, z

  x = me.control1
    y = me.control2
      z = me.control3
Then, maybe, if the combos have anything in common, you could group them somehow, and loop through them with the "me.controls" collection??
Code:
dim rs as recordset
  set rs = me.recordsetclone
for each "  " in me.controls

  if not isnull(c) then
    with rs
      .addnew
      !field = x
      !field = y
        etc, etc...
      .update
    end with
  end if

next c
This is really a sloppy way to do this stuff, but you don't really want an array here with all the combos' possible field values in it, because they all don't apply to the situation. Does this get you started? I don't want to write the entire thing out, first, because I don't know what all is involved here, and second, doing this kind of looping without an array really doesn't make sense to me! The data from all of the form's controls should really be consolidated somehow (so you can throw it all into the next record added), which is what I thought I could think of...
 

Users who are viewing this thread

Back
Top Bottom