Repeating Information on new Record

mapat

Registered User.
Local time
Today, 05:00
Joined
Feb 2, 2007
Messages
176
hello,

I have a form, and I am on record "A". When clicking to add a new record "B" I want all the same information on record "A" to show on the new record "B".
How can I do this without using default?

Thanks
 
Why do you want to duplicate information? Sound like a design flaw to me.
 
I am implementing a quoting system at work. Many times, a customer wants the same job that he asked for last year or 2 years ago, so basically it's the same information. So when the customer calls, I look for his last quote, and then would add a button that would create a new quote (record) but with the same information. It would be a burden to enter all the same information each time the customer calls for the same job over and over again.

Thank you
 
Sounds like you need a job table to store the job info in and a qoute table to associate a job with a qoute. Duplicating infomation is a flaw in the db desing.
 
I already have a job table and a quote table which are related. It would be the same information but a different date, but would still be different quotes.
I believe that based on our needs, it is better to repeat the neccesary information in the new quote.
If you know how to do this, I would appreciate your help

Thanks
 
This is a flaw in your design.

If you have a request for a quote, you store the quote in the quote table. That much is good. But since you KNOW you might have to repeat the quote later, you should have an RFQ table as well, and in this you store the customer info, date, and a pointer to the actual quote.

If another RFQ comes in that allows you to use exactly the same quote, just copy the pointer. If new quote, create the new quote, store it in the quote table, and store its pointer in the RFQ table.

If you cannot re-use all of the data for the second quote, you have a new quote. So the issue then becomes, what gets stored on a quote that stops you from re-using it. (That is rhetorical.)
 
The only attribute that should be duplicated in your database are Primary key's as Foreign key's in foreign tables.
 
I have 2 instances where creating a copie (not Complete) have been needed.

1, a jobbing system for rebooking new works or recalls (this reuses 90% or so)

2, discs and tracks you can have disc 1,2,3,4 and so on the only difference being the disc numbers ,disc time and number of tracks.
this is also done to make the system compatable with the likes of the cddb and for UI isues IE if a set of discs have 50 tracks.

but those are the only times if you need to create a dup record 100% then there is something very wrong.

This is how I do it for my discs/tracks
Code:
Private Sub CmdNew_Click()
Dim LastInSet As Integer, TotalInSet As Integer, V As Long, C As Long
Dim Pic As String, Img As String, Gen As String, SGen As String, TExt As String

'Walk Over Any Errors
On Error Resume Next
'Save The Added Info For Next Record
Img = Me![Picture]
Pic = Me.Imgage1.Picture
Gen = Me![Genre]
SGen = Me![SubGenre]
V = Me![VersionID]
C = Me![DefaultChartID]
LastInSet = Me![NumberInSet]
TotalInSet = Me![TotalInSet]
TExt = Me![TitleExtra]
    DoCmd.GoToRecord , , acNewRec
If MsgBox("I Will now Create a new disc For This Item do you wish to continue?" & vbCrLf & "Choseing No Will close this screen", vbExclamation + vbYesNo, "New Disc?") = vbNo Then
DoCmd.Close acForm, Me.Name
Exit Sub
End If
    Me![NumberInSet] = LastInSet + 1
    Me![TotalInSet] = TotalInSet
    Me![Picture] = Img
    Me.Imgage1.Picture = Pic
    Me![Genre] = Gen
    Me![SubGenre] = SGen
    Me![VersionID] = V
    Me![DefaultChartID] = C
    Me![TitleExtra] = TExt
        
End Sub

this is the resulting disc screen

Records1.jpg


mick
 
Similar issue

Hi,
I've been reading mapat's original post and it sounds kind of similar to what I would like to do, therefore I didn't start a new thread... so hopefully you guys are still reading.

I have a form based on a query linking multiple tables. I am adding new records using the form. In the form I have resource's name, supervisor, project and fields for hours. As users entered a new record, the supervisor field was automatically populated because of the relation between the resource and supervisor. The resource's name and supervisor repeated all the way down the form. My users (supervisors) only wanted one occurrence of resource name and supervisor so I moved these fields from the Detail section to the Header section of the form so they would not repeat.
Now when I attempt to add a new record I get an error (which I expected) because it doesn't know the resource's name.

Using Dreamweaver's code example, I was trying to add similar code in the ProjectID field's After Update Event. But it's not working. Probably because it is already in edit mode. I'm kind of fumbling though the VB part so if anyone had any ideas, I too would appreciate any help.


Private Sub ProjectID_Click()
Dim NewRsrcID As Integer, NewRsrcName As String

'Get the value of the last record for the new record
NewRsrcID = Me.ResourceID
NewRsrcName = Me.Name

DoCmd.GoToRecord , , acNext 'This won't work -already in the new record

'Assign last value to the new record
Me.ResourceID = NewRsrcID
Me.Name = NewRsrcName

End Sub


Attached is a screenshot of my form.

Thanks,
Lissa
 

Attachments

  • myExample.JPG
    myExample.JPG
    71.4 KB · Views: 101

Users who are viewing this thread

Back
Top Bottom