how to make grid view (1 Viewer)

qupe

Registered User.
Local time
Today, 12:13
Joined
Feb 15, 2016
Messages
51
hi everyone

i have a data base with movies name and a web link photo and i want to make form shows it as grid view is that possible ??

best regards

like this

 

sneuberg

AWF VIP
Local time
Today, 12:13
Joined
Oct 17, 2014
Messages
3,506
I've attached a zip file which has a folder with a database and images that demonstrates how images could be displayed. If you look at the form in design view you will see that it is a continuous form with five image controls and five textboxes which are bound to the table. The control source of the image control are of the form
Code:
=[currentproject].[Path] & "\" & [M1]

where in this example the images gets the file name from the textbox name M1 and it is prefixed by the folder of the database by [currentproject].[Path].

So this just shows that they can be displayed but I hope you can see that the table structure is far from being in normal form. So if you do it this way and want to have your data in normal form (you should) I think you will have to create a table like this from your normalized data when the form is loaded.
 

Attachments

  • Images.zip
    180.7 KB · Views: 249

MarkK

bit cruncher
Local time
Today, 12:13
Joined
Mar 17, 2004
Messages
8,178
Another thing I've done is a similar circumstance put a browser on the form, then write a web page programmatically, save it, and load that dynamically created web page in the form-hosted browser. Then you can use html, jQuery, etc... for your presentation.

I routinely do this with Google charts to display MS Access data in Forms. Google makes a much simpler charting API than Microsoft.
 

qupe

Registered User.
Local time
Today, 12:13
Joined
Feb 15, 2016
Messages
51
I've attached a zip file which has a folder with a database and images that demonstrates how images could be displayed. If you look at the form in design view you will see that it is a continuous form with five image controls and five textboxes which are bound to the table. The control source of the image control are of the form
Code:
=[currentproject].[Path] & "\" & [M1]

where in this example the images gets the file name from the textbox name M1 and it is prefixed by the folder of the database by [currentproject].[Path].

So this just shows that they can be displayed but I hope you can see that the table structure is far from being in normal form. So if you do it this way and want to have your data in normal form (you should) I think you will have to create a table like this from your normalized data when the form is loaded.

but this file is not automatic , i have to make each item .
i want the grid to be generated automatically, like continuous form but virtually and horizontally

i appreciate your caring
 

sneuberg

AWF VIP
Local time
Today, 12:13
Joined
Oct 17, 2014
Messages
3,506
but this file is not automatic , i have to make each item .
i want the grid to be generated automatically, like continuous form but virtually and horizontally

i appreciate your caring

You asked if it was possible. You get the automatic part by writing code and creating queries to make it happen. If you are new to VBA I suggest this video series.
 

static

Registered User.
Local time
Today, 19:13
Joined
Nov 2, 2015
Messages
823
You can open multiple copies of the same form.

Code:
Public Const grdform As String = "form1"
Public Const cols As Byte = 6

Public frmgrd(cols) As Form
Private Type rect
    l As Long
    t As Long
    h As Long
    w As Long
End Type
Private r As rect

Public Function GenGrd()
    Dim f As Form, i As Byte
    
    For i = 0 To cols
        Set frmgrd(i) = Nothing
    Next
    
    DoCmd.OpenForm grdform
    DoCmd.Maximize
    Set frmgrd(0) = Forms(grdform)
    r.w = frmgrd(0).WindowWidth / cols
    r.h = frmgrd(0).WindowHeight / 2
    DoCmd.Restore
    
    For i = 0 To cols
        If frmgrd(i) Is Nothing Then Set frmgrd(i) = New Form_Form1
        frmfmt frmgrd(i), r.w * i, 0, r.w, r.h
    Next
End Function

Private Sub frmfmt(f As Form, l As Long, t As Long, w As Long, h As Long)
    f.Move l, t, w, h
    f.ControlBox = True
    f.ScrollBars = 0
    f.RecordSelectors = False
    f.NavigationButtons = False
    f.Visible = True
    'f.BorderStyle = 0 'design view only
End Sub

displays 6 copies of form 1 in a row.
You would need another form to handle the record navigation.

You could add another dimension to the array for rows.
 

qupe

Registered User.
Local time
Today, 12:13
Joined
Feb 15, 2016
Messages
51
let me tel you the truth , i think myself as VBA modifier not as code writer :(
so i will be pleased if any one could write it :
it will be in the form for each record in the table make webbrowser and name to the end .



again i appreciate your help
 

static

Registered User.
Local time
Today, 19:13
Joined
Nov 2, 2015
Messages
823
I didn't understand the third sentence.

Creating the layout is only part of the problem.

Do you want to interact with it somehow? If not, what is the point of it? If you do want to interact with it, how you want to interact with it could influence whether or not a particular solution is viable.

If you want somebody to code it for you'd need to provide your database.
 

qupe

Registered User.
Local time
Today, 12:13
Joined
Feb 15, 2016
Messages
51
I didn't understand the third sentence.

Creating the layout is only part of the problem.

Do you want to interact with it somehow? If not, what is the point of it? If you do want to interact with it, how you want to interact with it could influence whether or not a particular solution is viable.

If you want somebody to code it for you'd need to provide your database.
this is my data base
View attachment moviedate.accdb
i want the photo to be shown and the name of the movie
the photo from link in photo field may be in a web browser
and line 3 : lets consider it as nothing because you better in writing codes

again i appreciate your effort :D
 
Last edited:

Users who are viewing this thread

Top Bottom