as a note. The control source property specifies where the form textbox value "comes from" or "goes to" tablewise
cplmckenzie
as a note. The control source property specifies where the form textbox value "comes from" or "goes to" tablewise
cplmckenzie
perfect cplmckenzie. Tanks tons. I have just maybe two more issues and it's ready to go, maybe you can help. I've figured out how to make it so they cannot acces the table or report, by hiding them and not having hidden shown, but is there anyway to open the form all by itself with no access toolbars or anything? Also besides massive coding is there anyway to make it so if I place a button on the form, report or table, that it will stop adding records entered after that point to that report? Maybe have it make a new report when the clerk needs to.
CWest,
That can quite possibly be accomplished using an "AutoExec" macro which will launch the access db upon opening with certain layout features. Can look in to the possiblilty.
As to you second issue, I would keep building onto my table records and would look to specifying that the Report only include record from "Begin Date to End Date" criteria.
Also in looking at your earlier image of the excel sheet layout, bear in mind that when exporting records out of access you will be creating a .csv file to import into excel.
Each field in the table equates to a cell in excel. So, if you export from access table fields 1,2,3,4,5 - you will read into excel cells 1,2,3,4,5.
Looking at the layout of both, I would suggest some minor layout modifications before you get too much design built into this.
cplmckenzie
Data calculated by expression in ControlSource is not automatically saved to record. This requires code.cplmckenzie is correct, use DefaultValue property.
Database has option to set a form to open by default when the db opens. Does not require AutoExec macro. In Access 2007: the Office button > Options > Current Database > set options as desired
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Okay. I have my form and all of the buttons I need. I have a report that can be printed using a button on the form. I also have a button that will delete all records currently stored in the table, with a warning dialog box for insurance. My problem is that after I delete all of the records, it still allows you to view previous records that are now showing DELETED in the text boxes. What I need to know, is if there is a code, so that after the button has been pressed and warning YES option selected that it will close the form. Also Is there a way to make it so only the form opens instead of the entire database for editing view.
Requery the form to refresh the dataset or just close the form.
DoCmd.Close acForm, Me.Name, acSaveNo
Cannot open form without opening db.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Is there anyway that I can open the database and then move the form to it's own window?
Okay below is the code for the clear all button. I attempted placing the close coding you posted into it and I am doing something wrong as it is not working. Could you point out where in the code it needs to fall please?
Private Sub Delete_Records_Click()
On Error GoTo Err_Delete_Records_Click
CurrentDb.Execute "Delete * From Records;"
Dim Answer As Integer
Answer = MsgBox("Are you sure you wish to delete all previous records?", vbYesNo + vbExclamation + vbDefaultButton2, "Delete Confirmation")
If Answer = vbYes Then
DoCmd.SetWarnings False
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
DoCmd.SetWarnings True
Else
End If
Exit_Delete_Records_Click:
Exit Sub
Err_Delete_Records_Click:
MsgBox Err.Description
Resume Exit_Delete_Records_Click
End Sub
If you want form in a window then maybe you need to set the db for Overlapping Windows instead of Tabbed Documents. As noted in post 34:
Office button > Options > Current Database > set options as desired
Where did you try? After the End If line? The Else is not needed because there is no code there.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.