How to Load data from List-box Double Click event. (1 Viewer)

qaaccess

Registered User.
Local time
Today, 09:31
Joined
Jul 23, 2014
Messages
18
Is it possible to load the data in input from by double clicking on data from list box ?

I have single form on which both input form and read-only form is present. as i used visible property to display or not accordingly.

User enters the data from input form. (It has been done)

User go onto read only form where combo box and list box. from drop down values load into list-box. (It has been done)

Now double click on any record then it should re-directed on input form with loading the data in editable mode for updation purpose. ???? (How this step will be done) ???
 

vbaInet

AWF VIP
Local time
Today, 17:31
Joined
Jan 22, 2010
Messages
26,374
In that case I don't understand your question. Perhaps you can show us a screenshot of what you're trying to do.
 

qaaccess

Registered User.
Local time
Today, 09:31
Joined
Jul 23, 2014
Messages
18
In that case I don't understand your question. Perhaps you can show us a screenshot of what you're trying to do.

Screenshot has been attached.
 

Attachments

  • Input Form.png
    Input Form.png
    15.3 KB · Views: 97
  • Output Form.png
    Output Form.png
    20.1 KB · Views: 87

vbaInet

AWF VIP
Local time
Today, 17:31
Joined
Jan 22, 2010
Messages
26,374
Your screenshot shows two forms but you say there's only one form. The code given in the link explains how you open one form based on some value passed to it.
 

qaaccess

Registered User.
Local time
Today, 09:31
Joined
Jul 23, 2014
Messages
18
Your screenshot shows two forms but you say there's only one form. The code given in the link explains how you open one form based on some value passed to it.

Dear it is one form, on same form i used visible yes no options for input and output fields.
 

vbaInet

AWF VIP
Local time
Today, 17:31
Joined
Jan 22, 2010
Messages
26,374
So what's the point of doing all of this on one form when you can have two forms?
 

qaaccess

Registered User.
Local time
Today, 09:31
Joined
Jul 23, 2014
Messages
18
So what's the point of doing all of this on one form when you can have two forms?

Dear i have used this property to load values

Me.ccid.Value = Me.NClst.Column(0).

Now i want to update the information in fields which has been loaded by double clicking from list box. i am using following code but update is not working.

Code:
If Me.ccid.Tag & "" = "" Then

    CurrentDb.Execute "Insert INTO tblNCM(CCID, Startdate, ItemID, Rejqty, Description, Descdate, Rootcause, Rootdate, Shortcontain, Shortdate, Longcontain, Longdate, CAImplementation, CAImpdate, Qualityplan, Qualitypdate, Verification, Verifdate)" & _
    " Values ( '" & Me.ccid & "' , #" & Me.stdate & "# , '" & Me.pnumlist & "' , " & Me.rejqty & " , '" & Me.Desc & "' , #" & Me.descdate & "# , '" & Me.rcause & "' , #" & Me.rdate & "# , '" & Me.scontain & "' , #" & Me.shdate & "# , '" & Me.lcontain & "' , #" & Me.ldate & "# , '" & Me.caimp & "', #" & Me.cadate & "# , '" & Me.qplan & "', #" & Me.qdate & "# , '" & Me.verify & "' , #" & Me.vdate & "#)"

Else

    CurrentDb.Execute "Update tblNCM " & _
    "  Set ccid = " & Me.ccid & _
    ", Startdate ='" & Me.stdate & "'" & _
    ", ItemID ='" & Me.pnumlist & "'" & _
    ", Rejqty = '" & Me.rejqty & "'" & _
    ", Description = '" & Me.Desc & "'" & _
    ", Descdate = ' #" & Me.descdate & "# ," & _
    ", Rootcause = '" & Me.rcause & "," & _
    ", Rootdate = ' #" & Me.rdate & " #," & _
    ", Shortcontain = '" & Me.scontain & "," & _
    ", Shortdate = ' # " & Me.shdate & " #," & _
    ", Longcontain = '" & Me.lcontain & "," & _
    ", Longdate = ' # " & Me.ldate & " # ," & _
    ", CAImplementation = '" & Me.caimp & "," & _
    ", CAImpdate = ' #" & Me.cadate & " #," & _
    ", Qualityplan = '" & Me.qplan & "," & _
    ", Qualitypdate = '#" & Me.qdate & "#," & _
    ", Verification = '" & Me.verify & "," & _
    ", Verifdate ='#" & Me.vdate & "#," & _
    " where ccid =" & Me.ccid.Tag
    
    
    
End If
 

vbaInet

AWF VIP
Local time
Today, 17:31
Joined
Jan 22, 2010
Messages
26,374
Can you upload a sample db? I need to see what you're doing.
 

Users who are viewing this thread

Top Bottom