I'm tryng getting data from a subform to the Main Form.
I'm using this code:
Me.data = Forms!nameSubform!dataname
This does not work.
Any help please!!!
Works with only one criteria.
When I try to use more then one criteria with this code:
DoCmd.OpenForm "Formname", , , "Data1 = " & "'"& Me.Datacriteria1 &"'" And "Data2 = " & "'"& Me.Datacriteria2 &"'"
When I run the program the following error appears:
Run-Time error '13'
Type mismatch
How to add a form to a query step by step
1 - Create a blank form.
2 - Open the form in mode view.
3 - Form disign tools select design then Property sheet.
4 - In Property sheet select Data Record Source.
5 - Select the query or table that you wish.
In a form create a button then create this...
Create a filter to display only those records that have the criteria required?
I'm using this code:
DoCmd.OpenForm "Formname"
Forms!Formname.Form.Filter = "Data = " & Me.Datacriteria
Forms!Formname.Form.FilterOn = True
When I run the program the following error appears:
Run-Time error '2448'...
The DAO is not a solution!!!
I Tried to do everything but nothing worked.
Can you explain how you can create a new record (row) in a form to display data from the database using the ADO?
When looking for a way to solve my problem, I found a way to show the data from the database through a...
The DAO works only for ACCESS 2007 or earlier.
I'm using ACCESS 2010, where the code only works with ADODB.
Can you explain with an example or step by step for ADODB.
Thanks!!!
yes I could use a pass-through query but I'm not reading all the records from a table.
As you can see in the code that I use I have a where clause.
This clause is coming from a text box.
This I can do to a single record with the code I have.
When I try to view multiple records, the form only...
I am trying to create a VBA code that allows me to display data from a SQL database.
I'm using this code:
Private Sub Form_Open(Cancel As Integer)
Dim i As Integer
Dim rsPDM As ADODB.Recordset
Dim strPDM As StringSet
rsPDM = New ADODB.Recordset
strPDM = "select * From PDM Where Ugf = 'Centro...
works but can not submit data in a form.
Can you tell me how I can put the data in the form (VBA).
I am using the following code:
Do While Not rsPDM.EOF
If i = DLookup("ID", "PDM", "ID =" & i) Then
Me.ID = rsPDM!ID
rsPDM.MoveNext
End If
i = i + 1
Loop
In...
My query is this:
SELECT ID, Municipio, DataEntrAFN, Dataactual, Atualidade, Ugf
FROM PDM
WHERE (Ugf = [Forms]![Form13]![UGF])
My database is a SQL database that i access by ado.
I created a query, the form.
After this step only made mistakes.
I tried to assign the data (UGF) directly in the query - error
I tried to use a when statement using the text box - error
I tried to use a macro - error
Can You send an example to put me on the right track.
I need to see some data structured by UGF!
Exemples:
Ugf = 'Centro Litural'
Ugf = 'Pinhal interior Norte'
This is more than 25 UGF and I do not want to create 25 Forms
Is there any way to create a query that i use a text box for select the Ugf?
I'm trying to create a VBA code that allows me to display a data of SQL database to a form.
I'm using this code to access and display data:
Private Sub Form_Open(Cancel As Integer)
Dim i As Integer
Dim rsPDM As ADODB.Recordset
Dim strPDM As String
Set rsPDM = New ADODB.Recordset
strPDM =...
I’m trying to make a browser for find a PDF file in directory (C:).
I find a way for a windows XP 32 bits that works, but I have a Windows 7 64 bits.
When I use the code a error appears in the two lines:
1-Private Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.