Próbując rozwiązać problem, o którym piszę tu:
Stworzyłem funkcję, która tworzy formularz z polami, które są wynikiem kwerendy.
Function UtwórzFormularzR8(mSQL As String) As String Dim rs As ADODB.Recordset Dim x As Integer Dim tmp_R8 As Form Dim tmp_control As Control Set rs = New ADODB.Recordset With rs .ActiveConnection = CurrentProject.Connection .CursorLocation = adUseClient .CursorType = adOpenKeyset .LockType = adLockPessimistic .Open mSQL End With x = rs.Fields.Count If x <= 1 Then GoTo UstawWartośćFunkcji Set tmp_R8 = CreateForm With tmp_R8 .CloseButton = True .AllowEdits = False .AllowDeletions = False .NavigationButtons = False .DefaultView = 2 End With For i = 1 To x Set tmp_control = CreateControl(tmp_R8.Name, acTextBox, acDetail, rs.Fields(i - 1).Name, rs.Fields(i - 1).Name) tmp_control.Name = rs.Fields(i - 1).Name Next i UstawWartośćFunkcji: If rs.EOF Then UtwórzFormularzR8 = "Brak" Else UtwórzFormularzR8 = tmp_R8.Name End If rs.Close Set rs = Nothing End Function
Później, po zapisaniu formularza pobieram do niego dane i wszystko hula. W pliku ACCDB po konwersji do ACCDE niestety różowo już nie jest. Czy jest jakieś obejście tego problemu? Czy da się w pliku ACCDE stworzyć formularz?