User Profile
Collapse
-
I keep playing with this and can not get the autonumber from Table1 to propagate to other tables. I know that this must be simple, I must be too simple -
I can't get this to work. Do i need to add some code n my on-Click to add the id from my primary table to other tables so I can keep the relationship?Leave a comment:
-
-
Problem with auto number 2 tables
Making progress with my data base but have run into a snag.
Working with an unbound form that place data into more than one table using a "save" button with this code.
Code:Private Sub Commandsaverecord_Click() Set db = CurrentDb Set rst = db.OpenRecordset("Table1") With rst .AddNew !DATE = Me.DATE !SHIFT = Me.SHIFT !SUPERVISOR = Me.SUPERVISOR
-
Thanks to everyone for your help. FishVal had it. This is what worked
[Forms]![FORM 1].[SFrm_Res2].SetFocus
[Forms]![FORM 1].[SFrm_Res2].[Form].[Resident2].SetFocus
Now is there any way to have the subforms update tables only after I click the save button on the main form?Leave a comment:
-
Thanks for everyones help but it is still not working. Now it does nothing. No error message.Leave a comment:
-
Ok, I placed this code
Private Sub [Staff1]_LostFocus()
Me.Parent![<SFrm_Staff2>].Form![Staff2].SetFocus
End Sub
The Field that I am trying to tab to tab to is [Staff2] in the SubForm SFrm_Staff2
What am I doing wrong? When I tab the first time nothing happens. Hit tab a 2nd time and I get the error message, can't find the Field <SFrm_Staff2> referred to in your ...Leave a comment:
-
Private Sub [Last Field in Tab Order in Sub-Form]_LostFocus()
Me.Parent![PackingDate].SetFocus
End Sub
This works great to tab from the subform to the main form. How about going to a second subform? I can't figure out what to place in the 2nd line to give focus to a field in a subform.Leave a comment:
-
Thanks for your help but, this does not work. I do not need away of prioritizing at all, that is done on the incident report when writen and then it is put in the fields accordingly. May be there is not a simple way of doing this?Leave a comment:
-
I may not have been clear. Each record in the table is an incident. So, if there is an incident report writen only Smith is involved then Smith is entered in the field [Staff 1]. If Smith and Jones are both involve then Smith is entered in the field [Staff 1] and Jones is entered in the field [Staff 2] or Jones is entered in the field [Staff 1] and Smith is entered in the field [Staff 2]. [Staff 1] would be the most involved etc.
If...Leave a comment:
-
query that counts from 3 fields
I have a data base that keeps track of incident reports. There may be 1, 2, or 3 staff involved in an incident. There are fields [staff 1], [staff 2], and [staff 3] in one table. A staff name may show up in any of the 3 fields. I have queries that show staff count in each field. The question is how do get one total, ie
Smith is in [Staff 1] 3 times, [Staff 2] 1 time, and [Staff 3] 2 times for a total of 6.
Jones is in [Staff... -
-
Command button to save record
I have a bound form to a table.
I have a command button to save when clicked that uses the following code.
Private Sub Commandsavereco rd_Click()
On Error GoTo Err_Commandsave record_Click
DoCmd.DoMenuIte m acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Exit_Commandsav erecord_Click:
Exit Sub
Err_Commandsave record_Click:
MsgBox Err.Description... -
-
Thanks for the responses. ChipR I tried this code and it does the same thing.Leave a comment:
-
I should have added the code for the comand button
Private Sub Command14_Click ()
Me.Visible = False
DoCmd.OpenRepor t "Incident Report by Month", acViewNormal, acEdit
DoCmd.Close acForm, "Report by Month"
End SubLeave a comment:
-
Ok, I created a form that asks for month # and year with a comand button that opens the report and enters the entered month and year for the queries. Everything works great except the report automatically prints and never opens. It prints the correct information. How do I fix it so it just opens the report to review and then can be printed by clicking on print?Leave a comment:
-
How do I have a report ask for parameters just one time?
I have 2 queries each with parameters to select month and year [Enter Month #] and [Enter Year]. Both do exactly as I want. When I run a reports based on the 2 queries they work great. How do I run both queries in one report and have it ask for the parameters just once? One report is run as a subreport.
No activity results to display
Show More
Leave a comment: