The value you entered is invalid for this field (1 Viewer)

luzz

Registered User.
Local time
Yesterday, 20:48
Joined
Aug 23, 2017
Messages
346
Hi all, I have issue when i try to click on the "edit" button on my unbound form the second time to retrieve the data on my subform to the textbox on my form.

Code:
Private Sub cmdEdit_Click()

'check whether there is exists data in list
If Not (Me.UnmatchFabricPOqrySubform.Form.Recordset.EOF And Me.UnmatchFabricPOqrySubform.Form.Recordset.BOF) Then
    'get data to text box control
    With Me.UnmatchFabricPOqrySubform.Form.Recordset
        
        Me.txtGLGPO = .Fields("PO") <Error appear here>
        Me.txtFabricDelivery = .Fields("Date")
        Me.txtStyleNo = .Fields("Style NO")
        Me.txtGLA = .Fields("GL Lot")
        Me.txtFabrication = .Fields("Description2")
        Me.txtWidth = .Fields("Fabric Cuttable Width")
        Me.txtColour = .Fields("Color")
        Me.txtLbs = .Fields("Our Qty")
        Me.txtYds = .Fields("Supplier Qty")
        Me.txtFabricDelivery = .Fields("Date")
        Me.txtFinishedGoods = .Fields("GSMBeforeWash")
        Me.txtGSMsq = .Fields("GMS Per SqYD")
        Me.txtPrintedRemarks = .Fields("Remark")
        Me.txtFabricWeight = .Fields("Fabric Weight")
        Me.TXTuNITpRICE = .Fields("Unit Price")
        Me.txtName1 = .Fields("Name1")
        Me.txtGarmentDelDate = .Fields("Garment Delivery Date")
        Me.txtLine = .Fields("Line")
        Me.Image97.Picture = Me.txtGarmentSketch & ""

I have no idea what causes this, as i try to change the data type for my PO number from short text to number then number to short text again, but it still doesnt seem to work.
Besides that, i have no issue for the first time when i click on the "edit" button and no issue once i close the form and open it again.
Appreciated any help that is offer!
 

isladogs

MVP / VIP
Local time
Today, 04:48
Joined
Jan 14, 2017
Messages
18,212
I realise you've been asked this before, but its still not clear why you persist in using an unbound form

You may making a huge amount of unnecessary work for yourself instead of letting Access do the donkey work for you

I have no idea what causes this, as i try to change the data type for my PO number from short text to number then number to short text again, but it still doesnt seem to work.

Saying "it still doesn't seem to work." isn't going to help anyone help you
What happens - error message / database crashes or what?

Besides that, i have no issue for the first time when i click on the "edit" button and no issue once i close the form and open it again.

Does that mean it opens & closes properly or that there is an issue?
 

Mark_

Longboard on the internet
Local time
Yesterday, 20:48
Joined
Sep 12, 2017
Messages
2,111
Personally, I'd make sure you are using a grounded outlet prior to connection, but for your immediate issue the proper steps would be to unplug from the wall, remove the power supply and replace the full wiring harness. If smoke persists then you'd have to replace the motherboard itself though I've seen motherboards that worked much better after having been smoked once.

Of course if the issue you are having is other than "Smoke comes out of the case every time I press the edit button for the second time" then I'd need a better description of the issue. Either that or I need more espresso.... but I always need more espresso so that is a default state.
 

Users who are viewing this thread

Top Bottom