Don't be afraid to try what I have suggested ...
firstly, turn off or cancel any wizard that pops up to help you, I gave
you the properties you need to set.
~~~
To create a table, from the database window, click on the Tables tab --
once there, click the NEW button -- choose Design view and type in what
I gave you.
For Long Integer, choose Number data type and then Long Integer is the
default size in thew lower pane.
Make sure to fill out field descriptions even if all you do is put the
fieldname in there. Don't use spaces or special characters other than _
in your fieldnames
~~~
To create a new form, click the NEW button in the forms window
Once in the form design view, turn on Properties
View, Properties from the menu
The Properties window will display properties about whatever is selected
(look in its title bar)
To select the form itself, click where the Rulers intersect in the upper
left corner
Turn on the toolbox (hammer & wrench icon)
Turn on the fieldlist (once you pick form RecordSource, it will fill up)
To make a control on the form, click the tool you want (ie: combobox),
then drag a field from the fieldlist onto the form
Hopefully, this gets you started -- gotta run now ...
Warm Regards,
Crystal
Microsoft Access MVP 2006
*
Have an awesome day
remote programming and training
strive4peace2006 at yahoo.com
*
autowizz wrote:
That looks great, only problem I have is, I have never really used
access to set anything up before so I am lost at how to do everything
you wrote down. Any suggestions on what I can do or is there someone
out there that can set it up for me and email it to me? I would be
indebted forever...
:
Here is a simplified structure to accomodate your needs:
*Cars*
CarID, autonumber
OwnerID, long integer
CarNumber, number, long
(or text if it contains letters)
*CarClasses*
ClassID, autonumber
Class, text
*Shows*
ShowID, autonumber
LocID, long integer
ShowDate, date
*Owners*
OwnerID, autonumber
Lastname, text
Firstname, text
*Locations*
LocID, autonumber
Location, text
*Votes*
VoteID, autonumber
ShowID, long integer
OwnerID, long integer
ClassID, long integer
CarID, long integer, defaultValue=null
make a unique index on the combination of:
ShowID
OwnerID
ClassID
set up a form to enter Votes once all the other information is known
main form: unbound
'~~~~~~~~~~~~~
combobox:
Name --> ShowID
ControlSource -->
RowSource -->
SELECT S.ShowID, S.ShowDate
L.Location
FROM Shows as S
INNER JOIN Locations as L
ON S.LocID = L.LocID
ORDER BY ShowDate desc, Location
BoundColumn --> 1
ColumnCount --> 3
columnWidths --> 0;1;2
(etc for however many columns you have
-- the ID column will be hidden since its width is zero)
ListWidth --> 3
(should add up to the sum of the column widths)
ShowID will be stored in the control while showing you information
from another table...
Since the first column, ShowID, has a width of 0, what shows up in
the combobox will be the seoncd column, ShowDate. To display the
Location, use a calculated control:
Name --> Location
ControlSource --> = ShowID.column(2)
column indexes start with 0, not 1 in Access -- so column index= 2 is
really column 3
'~~~~~~~~~~~~~
combo:
Name --> OwnerID
ControlSource -->
RowSource -->
SELECT OwnerID,
Firstname & ' ' & Lastname as Owner
FROM Owners
ORDER BY Firstname, Lastname
BoundColumn --> 1
ColumnCount --> 2
columnWidths --> 0;1.5
ListWidth --> 1.5
'~~~~~~~~~~~~~
command button:
Name --> cmdCreateRecords
Caption --> Create Vote Records
OnClick --> [Event Procedure]
'~~~~~~~~~
'(this is whose vote card it is)
if isnull(me.OwnerID) then
msgbox "Specify Owner",,"Missing data"
exit sub
end if
if isnull(me.ShowID) then
msgbox "Specify Show",,"Missing data"
exit sub
end if
dim s as string
s = "INSERT INTO Votes " _
& " (ShowID, OwnerID, ClassID) " _
& " SELECT " _
& me.ShowID & ", " _
& me.OwnerID & ", " _
& " CarClasses.ClassID "
& " FROM Votes, CarClasses;"
debug.print s
currentdb.execute s
currentdb.tabledefs.refresh
DoEvents
me.vote_subform_controlname.form.requery
'~~~~~~~~~
'~~~~~~~~~
'~~~~~~~~~
As you can see, I have referenced a subform for the Votes
Make a continuouse subform:
RecordSource --> Votes
VoteID: textbox, Locked=true, TabStop=false
ShowID: textbox, Visible=false
(can go in form header or footer)
OwnerID: textbox, Visible=false
(can go in form header or footer)
ClassID: combobox, Locked=true, TabStop=false
CarID: combobox
(this is the only control you will enter information into)
Now save the (sub)form and close it
'~~~~~~~~~
go back to the design view of the mainform
make a subform control:
sourceObject --> your Vote form name
Name --> YourVoteFormName
LinkMasterFields --> ShowID; OwnerID
LinkChildFields --> ShowID; OwnerID
this should get you started
Warm Regards,
Crystal
Microsoft Access MVP 2006
*
Have an awesome day
remote programming and training
strive4peace2006 at yahoo.com
*
autowizz wrote: