chrisjames25
Registered User.
- Local time
- Today, 01:06
- Joined
- Dec 1, 2014
- Messages
- 404
Hoping you guys can help. Currently pulling hair out as last 4 hours of work has suddnely glitched (ive done something) and i dont know how to fix it.
I have a form (image attached) I choose from a supplier from a combobox and based on the supplier chosen a list of sales orders is populated in a sales order combobox. ONce i have selected the sales order i want to edit i click eidt sales order. THis refreshes the record source qry based on the slection in the sales order cbo. IMage attached.
All works fine and then the rest of the form is populated. info on the right of screen is all bound data and info in the amend sales order info section is unbound. I alter anythign i want in the amend sales order info section. I then click edit and it amends the data and then resets the form using the following code:
The reset form part of the code is here:
Earlier tonight this code worked fine but now i get an error code runtime error 3071 appear and the bound data just populates with Name?.
I have no clue what has changed. ANy help would be greatly appreciated.
I have a form (image attached) I choose from a supplier from a combobox and based on the supplier chosen a list of sales orders is populated in a sales order combobox. ONce i have selected the sales order i want to edit i click eidt sales order. THis refreshes the record source qry based on the slection in the sales order cbo. IMage attached.
All works fine and then the rest of the form is populated. info on the right of screen is all bound data and info in the amend sales order info section is unbound. I alter anythign i want in the amend sales order info section. I then click edit and it amends the data and then resets the form using the following code:
Code:
Application.Echo False
ApplyData
ResetForm
Me.Form.Requery
The reset form part of the code is here:
Code:
Sub ResetForm()
'DATA
Me.Cbo_Supplier2.Value = vbNullString
Me.Cbo_Supplier2.Enabled = False
Me.Txt_WeekNo.Value = vbNullString
Me.Txt_WeekNo.Enabled = False
Me.Cbo_Nursery.Value = vbNullString
Me.Cbo_Nursery.Enabled = False
Me.Txt_SalesOrderNo.Value = vbNullString
Me.Txt_SalesOrderNo.Enabled = False
'CMD BUTTONS
Me.Cmd_Cancel.Enabled = False
Me.Cmd_Edit.Enabled = False
' Me.Cmd_Close.Enabled = True
' Me.Txt_SalesOrderID.Value = vbNullString
' Me.Form.RecordSource = "Qry_SalesOrderEdit1"
'#######################
'TOP INFO
Me.Cbo_Supplier.Enabled = True
Me.Cbo_Supplier.Value = vbNullString
Me.Cbo_SalesOrderNo.Requery
Me.Cbo_SalesOrderNo.Value = vbNullString
Me.Cmd_Close.Enabled = True
Me.Cmd_EditSalesOrder.Enabled = True
End Sub
Earlier tonight this code worked fine but now i get an error code runtime error 3071 appear and the bound data just populates with Name?.
I have no clue what has changed. ANy help would be greatly appreciated.