Oups, should I've though about it a little bit more. I just have to add a .Form before .RecordsetClone and .Bookmark for it to work... :o
Anyway, thanks again pbaldy for you quick reply.
JC
Hi,
I've been away from Access for a while but now I'm back in action :) . Maybe I'm rusty from the lack of practice but I think this one will be hard to resolve. So here it is:
I have a form in datasheet presentation and when I double-click on a record, I need to open another form. This I...
I have a sub-form open in continuous mode. So, I see a repetition of the form because there's more than one records active.
What I would like to know is the total height of the form. Not the height of the sub-form frame. Just the height of one record would also be ok since I will only have...
Try this but change the form, subform and field name first:
[Form_SecondForm].[SubForm]!FieldName.Value = [Form_FirstForm].[SubForm]!FieldName.Value
Put a line like this for each field you want to copy
To know if a room is already book you could make an sql call where you put "Where [BookDate] Between [StartDate] and [EndDate]". Then you check if there's at least a record returned. If there is, it means the room is already book.
If your talking about my original code, it wasn't always working because I was comparing text69 with "" and a Null value isn't equal to "" even if it looks the same in the field.
You should always use the function IsNull to check for a Null in a field and Trim() to check if your field is fill...
No but you could hide this textbox and create another textbox which will contain the value of the autonumber textbox only if it's a number.
In the new textbox insert this in the source:
=IIf(IsNumeric([txtAutoNumber]);[txtAutoNumber];"")
You could change it for:
If (trim(me.text69) = "") or isNull(me.text69) Then
This way, your message box will appear if the textbox contain nothing of is fill with blank.
You have two problem in your code
First:
MsgBox ("no impact")
Should be:
MsgBox "no impact"
if you don't want to handle the return value of MsgBox
Second:
If text69 = "" Then
text69 doesn't refer to a field on your form like that
It should be something like this:
If me.text69 = "" Then
So...
You could pass the code through a function which remove the blank first.
Public Function RemoveBlank(ByVal strCode As String) As String
Dim x As Integer
Dim strResult As String
For x = 1 To Len(strCode)
If Mid(strCode, x, 1) <> " " Then
strResult = strResult + Mid(strCode, x, 1)...