variable form and subform

gluse

New member
Local time
Today, 07:37
Joined
Nov 11, 2015
Messages
4
Dim broj
Dim strForm As String
strControl As String
strSubformControl As String

broj = Forms![FILTERIZBORNIK]![pozicija]

strForm = "osnovni podaci"
strSubformControl = "stac upis desna"
strControl = "1N"

Forms![(strForm)]![strSubformControl].Form![(strControl)] = broj

not work
error end line
 
I want the forms to open a new form by sending a variable order in a new form, and double-click on the label to send the data back to the first form
 
Try this and see if it works
Forms!(strForm)!(strSubformControl).Form!(strControl) = broj
 
fixit

Private Sub NAZIV_DblClick(Cancel As Integer)


Dim FormName As String
Dim NAZIV As String
Dim CJENA As String
Dim KOLICINA As String
Dim SIFA As String
Dim UKUPNO As String

FormName = Forms![FILTERIZBORNIK]![pozicija]
NAZIV = FormName + "N"
CJENA = FormName + "C"
KOLICINA = FormName + "K"
SIFA = FormName + "S"
UKUPNO = FormName + "U"


Forms![osnovni podaci]![stac upis desna].Form(NAZIV) = Me.NAZIV
Forms![osnovni podaci]![stac upis desna].Form(CJENA) = Me.Cijena
Forms![osnovni podaci]![stac upis desna].Form(KOLICINA) = "1"
Forms![osnovni podaci]![stac upis desna].Form(SIFA) = Me.SIFRA
Forms![osnovni podaci]![stac upis desna].Form(UKUPNO) = Me.Cijena * 1

DoCmd.Close

End Sub
 

Users who are viewing this thread

Back
Top Bottom