I'm trying to export from a text file. However one of the fields contains 2 items of data, ie the code and name of a person.
eg 'po2 Paul O Mahony'. What I want to do is query only the code(first 3 digits) from this field. ie 'po2'. Is there a way of doing this within a query (sql) or do I...
Hi,
I've got a close button on my form as follows:
Private Sub exitForm_Click()
DoCmd.Close
End Sub
In the beforeupdate event of the form I have have following code to validate the forms fields:
Private Sub Form_BeforeUpdate(Cancel As Integer)
'Place an asterisk (*) in the Tag Property...
Thanks,
I got and answer to this question now.....date query criteria should read
>=DateAdd("d",-7-(Weekday(Now())-1),Now()) And <=DateAdd("d",(-6-(Weekday(Now())-1)+6),Now())
I need to create a report that gives me the data from the previous accouting week. For example, if I try to display the report on a wednesday, it will give me the data from monday to sunday of the previous week. The same thing will happen if I print the report on thursday. I.E. I should still...
thanks Mikk, but that doesnt really suit my purposes. The field in question can be a 0 value in certain circumstances, so what I want to do is set a condition that executes before the user closes the form. Here is the code, if that makes it clearer to you.
Private Sub Form_BeforeUpdate(Cancel...
Thanks for that Rich,
I get a message saying that there is an error ...if you close object now, the data will be lost. I presume this is the generic message you get if the cancel state is true. Is it possible to replace the message with a more user friendly one, do you think?
I tried putting the following code in the form unload procedure, but although it does generate the correct message, it doesnt stop the form from closing.
Private Sub Form_Unload(Cancel As Integer)
If [Starttime] > 0 And [Admin_time] = 0 Then
response = MsgBox("Please click on the...
I guess this is a fairly basic one. I have a form that allows people to edit records, but I want to prevent people from adding new records on this form. I thought that if I put 'no' in the 'Allow additions' property, I would achieve this end, but when I do this, all the input boxes dissappear...
thanks very much for this. It works a treat.
I am getting an error though when the form opens (invalid use of null) which is caused by the call to this routine. not sure why this is happening, but the routine works in any event it appears.
Hi,
I guess this is a bit of a newby question. I have 2 rather long but identical subroutines attached to 2 forms. I am going to be creating more forms that will use this subroutine, so I would like to have 1 public routine that I can call from all forms, rather then having to update several...
I'm trying to create a form without the standard navigation arrows on the bottom of the form. Is it possible to hide these? I want to use my own navigation buttons instead as they will be more intuitive to non tech users.
appreciate it