Hi
Use the On Click event of your Command Button.
DoCmd.OpenForm "YourNewFormNameHere",,,"[IDNo] = " & Me.txtYourRecordIDFieldHere
IDNo is the unique record number (Primary Key) of the record you want to open, and Me.txtYourRecordIDFieldHere is the field on your form that contains that...
Hi
Does anyone know of a grid control (ActiveX) that can be used on a form that will enable drag and drop between cells and update the underlying data?
Basically it is to implement in a small guest house booking system (developed in A2002). The x-axis of the grid will be dates (which will need...
Hi
You could do it by opening a recordset........
Dim db As DAO.DataBase
Dim rs As DAO.RecordSet
Set db = CurrentDB()
Set rs = db.OpenRecordSet("YourTableName")
rs.AddNew
rs("FirstName") = Me.FName
rs("LastName") = Me.LName
etc..........
rs.UpDate
Set db = Nothing
Set rs = Nothing
HTH
Hi
Has anyone any experience of or used grid32.ocx (which I believe is for DAO recordsets) or msdatgrd.ocx (which is for ADO recordsets)? I can find info on using the controls via VB or C++ but not for implementing/using them in Access with VBA, or even registering either of them in Access.
I...
Hi Bill
Oooops, my apologies. I didn't notice a different poster, but many thanks for your solution to my latest headache - and also for your post Jim. Without help from people such as yourselves there would be a lot of non functioning db's!!
Thanks again
Alan
Hi Jim
Thanks for the reply. Still getting the type mismatch error even dropping the single quotes (MyInt is an integer)
If DCount("*", "tblMemos", "[NoteDate] < Date() - " & Myint & "" _
And IsNull("[ActionNotes]")) > 0 Then
Any other ideas...
Hi
Could someone please have a look at the following for me
If DCount("*", "tblMemos", "[NoteDate] < Date() - '" & Myint & "'" AND IsNull "[(ActionNotes]") = 0 Then etc
Basically I just want to check if [NoteDate] is less than two days...
Hi All
I've been trying to use the code supplied by Rolliee (in my case it doesn't matter whether it's the earliest or latest record thats retained) but up till now haven't managed to get it to work (type mismatch errors etc particularly the line okay = okay & (rs.fields(i) = ar(i))) although...
Hi
I've just looked at a db built by a family friend, and discovered many duplicate entries in a table (amongst other things lol). I've created a Find Duplicate query and then a delete query based on the Find Duplicate query, but that will obviously delete ALL occurences of the duplicate data...
Hi Hasu
Thanks for the reply. Will work on it tomorrow, my eyes are rapidly cosing right now and I need sleep!!
Thanks for your time and help
Cheers
Alan
Hi
Thanks for the reply. Your code stops the MS error message fine, but on clicking 'Yes' on the message box the form now closes instead of going back to the open form to input the missing data. Any thoughts?
Thanks for your time
Alan
Hi
I have the following code attached to the Before Update event of a form which loops through all the forms controls and prompts the user for data entry or not for any required fields (any fields for the code to 'skip over' are in the If ctl.Name = etc section):
Private Sub...
Hi
Have you tried exporting all the already input data on the various controls on Form1 to public variables when clicking any of your command buttons and then re-importing the data back to the relevant fields on any forms your command buttons open? You'll need to create the public variables in...
Hi
That solved the problem. Many thanks - I'd have never thought of that in a million years but will be very aware of it in future. So much to learn and so little time........... :)
Thanks again
Alan
Hi
I'm using a DCount function to check if a selected date in a combo box and ID number in a text field (both controls on the same subform) combination already exists in the underlying table, code of which is
Private Sub cboDateCom_BeforeUpdate(Cancel As Integer)
'make sure date has not...
Hi
Thanks for your reply. I've given up on the aspirins - it's 24 hours later and still getting nowhere am thinking of valium or prozac!!
I think I'm missing something really stupid here. tbl1 and tbl2 are related as 1-M to tbl3, meaning tbl3 is the junction table of a M-M relationship. If I...
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.