AlvaroCity
Registered User.
- Local time
- Today, 17:09
- Joined
- Jul 16, 2016
- Messages
- 70
Hello everyone.
"Developing" my data base I bumped into another problem. Now this time is that I am trying to set either a order is New, In process or Closed.
To do so, I created a table with these 3 States and Referential Integrity with the table Orders, so number 1 is New, number 2 is In process and number 3 is Closed.
I had a look at Northwind 2007 to try to have an idea about how to do, but this seems to be more difficult than I first thought.
I could understand that I have to create a module with the different states ("Albaran means Order")
Then I created a subfuntion in the Albaran´s form (Order´s form)
This is what I have so far. Now I dont know to assign every state to the combo that assigns if the order is new, in process or closed.
"Developing" my data base I bumped into another problem. Now this time is that I am trying to set either a order is New, In process or Closed.
To do so, I created a table with these 3 States and Referential Integrity with the table Orders, so number 1 is New, number 2 is In process and number 3 is Closed.
I had a look at Northwind 2007 to try to have an idea about how to do, but this seems to be more difficult than I first thought.
I could understand that I have to create a module with the different states ("Albaran means Order")
PHP:
Public Enum AlbaranState
New_Albaran = 0
InProcess_Albaran = 1
Closed_Albaran = 2
End Enum
PHP:
Sub SetformState()
Dim State As AlbaranState
If (Me.cboIDEstado.Value = 1) Then
State = New_Albaran
ElseIf (Me.cboIDEstado.Value = 2) Then
State = InProcess_Albaran
ElseIf (Me.cboIDEstado.Value = 3) Then
State = Closed_Albaran
End If
Me.lblExportado.Visible = (State = Closed_Albaran)
Me.imgexp.Visible = (State = Closed_Albaran)
Me.imgedit.Visible = (State <> Closed_Albaran)
Me.frmSubAlbaran.Locked = (State = Closed_Albaran)
Me.txtAlbaranNumero.Enabled = (State = New_Albaran) Or (State = InProcess_Albaran)
Me.txtFecha.Enabled = (State = New_Albaran) Or (State = InProcess_Albaran)
Me.cboCliente.Enabled = (State = New_Albaran) Or (State = InProcess_Albaran)
End Sub
Last edited: